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: i64Grid-based height
c_wid: i64Grid-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
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: StringUser defined unique identifier
padding: i64Distance in pixels from image borders
px_hei: i64Image height in pixels
px_wid: i64Image 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: i64Space in pixels between all tiles
An array of user-defined tags to organize the Tilesets
Optional Enum definition UID used for this tileset meta-data
tile_grid_size: i64§uid: i64Unique Intidentifier
Trait Implementations§
Source§impl Clone for TilesetDefinition
impl Clone for TilesetDefinition
Source§fn clone(&self) -> TilesetDefinition
fn clone(&self) -> TilesetDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TilesetDefinition
impl Debug for TilesetDefinition
Source§impl<'de> Deserialize<'de> for TilesetDefinition
impl<'de> Deserialize<'de> for TilesetDefinition
Source§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>,
Auto Trait Implementations§
impl Freeze for TilesetDefinition
impl RefUnwindSafe for TilesetDefinition
impl Send for TilesetDefinition
impl Sync for TilesetDefinition
impl Unpin for TilesetDefinition
impl UnwindSafe for TilesetDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more