Struct ldtk2::TilesetDefinition [−][src]
pub struct TilesetDefinition {Show 15 fields
pub c_hei: i64,
pub c_wid: i64,
pub cached_pixel_data: Option<HashMap<String, Option<Value>>>,
pub custom_data: Vec<HashMap<String, Option<Value>>>,
pub enum_tags: Vec<HashMap<String, Option<Value>>>,
pub identifier: String,
pub padding: i64,
pub px_hei: i64,
pub px_wid: i64,
pub rel_path: String,
pub saved_selections: Vec<HashMap<String, Option<Value>>>,
pub spacing: i64,
pub tags_source_enum_uid: Option<i64>,
pub tile_grid_size: i64,
pub uid: i64,
}
Expand description
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
c_hei: i64
Grid-based height
c_wid: i64
Grid-based width
cached_pixel_data: Option<HashMap<String, Option<Value>>>
The following data is used internally for various optimizations. It’s always synced with source image changes.
custom_data: Vec<HashMap<String, Option<Value>>>
An array of custom tile metadata
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.
identifier: String
Unique String identifier
padding: i64
Distance in pixels from image borders
px_hei: i64
Image height in pixels
px_wid: i64
Image width in pixels
rel_path: String
Path to the source file, relative to the current project JSON file
saved_selections: Vec<HashMap<String, Option<Value>>>
Array of group of tiles selections, only meant to be used in the editor
spacing: i64
Space in pixels between all tiles
Optional Enum definition UID used for this tileset meta-data
tile_grid_size: i64
uid: i64
Unique Intidentifier
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for TilesetDefinition
impl Send for TilesetDefinition
impl Sync for TilesetDefinition
impl Unpin for TilesetDefinition
impl UnwindSafe for TilesetDefinition
Blanket Implementations
Mutably borrows from an owned value. Read more