Struct ldtk2::LayerDefinition[][src]

pub struct LayerDefinition {
Show 17 fields pub layer_definition_type: String, pub auto_rule_groups: Vec<AutoLayerRuleGroup>, pub auto_source_layer_def_uid: Option<i64>, pub auto_tileset_def_uid: Option<i64>, pub display_opacity: f64, pub excluded_tags: Vec<String>, pub grid_size: i64, pub identifier: String, pub int_grid_values: Vec<IntGridValueDefinition>, pub px_offset_x: i64, pub px_offset_y: i64, pub required_tags: Vec<String>, pub tile_pivot_x: f64, pub tile_pivot_y: f64, pub tileset_def_uid: Option<i64>, pub purple_type: Type, pub uid: i64,
}

Fields

layer_definition_type: String

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

auto_rule_groups: Vec<AutoLayerRuleGroup>

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. WARNING: some layer instances might use a different tileset. So most of the time, you should probably use the __tilesetDefUid value from layer instances.

display_opacity: f64

Opacity of the layer (0 to 1.0)

excluded_tags: Vec<String>

An array of tags to forbid some Entities in this layer

grid_size: i64

Width and height of the grid in pixels

identifier: String

Unique String identifier

int_grid_values: Vec<IntGridValueDefinition>

An array that defines extra optional info for each IntGrid value. The array is sorted using value (ascending).

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)

required_tags: Vec<String>

An array of tags to filter Entities that can be added to this layer

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. WARNING: some layer instances might use a different tileset. So most of the time, you should probably use the __tilesetDefUid value from layer instances.

purple_type: Type

Type of the layer as Haxe Enum Possible values: IntGrid, Entities, Tiles, AutoLayer

uid: i64

Unique Int identifier

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.