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)
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)
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
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 LayerDefinition
impl Send for LayerDefinition
impl Sync for LayerDefinition
impl Unpin for LayerDefinition
impl UnwindSafe for LayerDefinition
Blanket Implementations
Mutably borrows from an owned value. Read more