pub struct TilesetDefinition {
Show 17 fields pub c_hei: i64, pub c_wid: i64, pub cached_pixel_data: Option<HashMap<String, Option<Value>>>, pub custom_data: Vec<TileCustomMetadata>, pub embed_atlas: Option<EmbedAtlas>, pub enum_tags: Vec<EnumTagValue>, pub identifier: String, pub padding: i64, pub px_hei: i64, pub px_wid: i64, pub rel_path: Option<String>, pub saved_selections: Vec<HashMap<String, Option<Value>>>, pub spacing: i64, pub tags: Vec<String>, 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<TileCustomMetadata>

An array of custom tile metadata

§embed_atlas: Option<EmbedAtlas>

If this value is set, then it means that this atlas uses an internal LDtk atlas image instead of a loaded one. Possible values: <null>, LdtkIcons

§enum_tags: Vec<EnumTagValue>

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

User defined unique 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: Option<String>

Path to the source file, relative to the current project JSON file
It can be null if no image was provided, or when using an embed atlas.

§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

§tags: Vec<String>

An array of user-defined tags to organize the Tilesets

§tags_source_enum_uid: Option<i64>

Optional Enum definition UID used for this tileset meta-data

§tile_grid_size: i64§uid: i64

Unique Intidentifier

Trait Implementations§

source§

impl Clone for TilesetDefinition

source§

fn clone(&self) -> TilesetDefinition

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TilesetDefinition

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TilesetDefinition

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for TilesetDefinition

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

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