[][src]Struct ldtk::LayerDef

pub struct LayerDef {
    pub layer_def_type: String,
    pub auto_rule_groups: Vec<HashMap<String, Option<Value>>>,
    pub auto_source_layer_def_uid: Option<i64>,
    pub auto_tileset_def_uid: Option<i64>,
    pub display_opacity: f64,
    pub grid_size: i64,
    pub identifier: String,
    pub int_grid_values: Vec<HashMap<String, Option<Value>>>,
    pub px_offset_x: i64,
    pub px_offset_y: i64,
    pub tile_pivot_x: f64,
    pub tile_pivot_y: f64,
    pub tileset_def_uid: Option<i64>,
    pub purple_type: String,
    pub uid: i64,
}

Fields

layer_def_type: String

Type of the layer (IntGrid, Entities, Tiles or AutoLayer)

auto_rule_groups: Vec<HashMap<String, Option<Value>>>

Contains all the auto-layer rule definitions.

auto_source_layer_def_uid: Option<i64>auto_tileset_def_uid: Option<i64>

Reference to the Tileset UID being used by this auto-layer rules

display_opacity: f64

Opacity of the layer (0 to 1.0)

grid_size: i64

Width and height of the grid in pixels

identifier: String

Unique String identifier

int_grid_values: Vec<HashMap<String, Option<Value>>>px_offset_x: i64

X offset of the layer, in pixels (IMPORTANT: this should be added to the LayerInstance optional offset)

px_offset_y: i64

Y offset of the layer, in pixels (IMPORTANT: this should be added to the LayerInstance optional offset)

tile_pivot_x: f64

If the tiles are smaller or larger than the layer grid, the pivot value will be used to position the tile relatively its grid cell.

tile_pivot_y: f64

If the tiles are smaller or larger than the layer grid, the pivot value will be used to position the tile relatively its grid cell.

tileset_def_uid: Option<i64>

Reference to the Tileset UID being used by this tile layer

purple_type: String

Type of the layer as Haxe Enum

uid: i64

Unique Int identifier

Trait Implementations

impl Debug for LayerDef[src]

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

impl Serialize for LayerDef[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, 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.