Struct ldtk::TilesetDef[][src]

pub struct TilesetDef {
Show fields pub tags_source_enum_uid: Option<i32>, pub padding: i32, pub rel_path: String, pub identifier: String, pub tile_grid_size: i32, pub cached_pixel_data: Option<HashMap<String, Value>>, pub enum_tags: Vec<HashMap<String, Value>>, pub saved_selections: Vec<HashMap<String, Value>>, pub px_hei: i32, pub uid: i32, pub __c_hei: i32, pub custom_data: Vec<HashMap<String, Value>>, pub __c_wid: i32, pub px_wid: i32, pub spacing: i32,
}

The Tileset definition is the most important part among project definitions. It contains some extra informations about each integrated tileset. If you only had to parse one definition section, that would be the one.

Fields

tags_source_enum_uid: Option<i32>

Optional Enum definition UID used for this tileset meta-data

padding: i32

Distance in pixels from image borders

rel_path: String

Path to the source file, relative to the current project JSON file

identifier: String

Unique String identifier

tile_grid_size: i32
cached_pixel_data: Option<HashMap<String, Value>>

The following data is used internally for various optimizations. It’s always synced with source image changes.

enum_tags: Vec<HashMap<String, Value>>

Tileset tags using Enum values specified by tagsSourceEnumId. This array contains 1 element per Enum value, which contains an array of all Tile IDs that are tagged with it.

saved_selections: Vec<HashMap<String, Value>>

Array of group of tiles selections, only meant to be used in the editor

px_hei: i32

Image height in pixels

uid: i32

Unique Intidentifier

__c_hei: i32

Grid-based height

custom_data: Vec<HashMap<String, Value>>

An array of custom tile metadata

__c_wid: i32

Grid-based width

px_wid: i32

Image width in pixels

spacing: i32

Space in pixels between all tiles

Trait Implementations

impl Clone for TilesetDef[src]

impl Debug for TilesetDef[src]

impl<'de> Deserialize<'de> for TilesetDef[src]

impl Serialize for TilesetDef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.