pub struct LayerDefinition {Show 25 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 guide_grid_hei: i64,
pub guide_grid_wid: i64,
pub hide_fields_when_inactive: bool,
pub hide_in_list: bool,
pub identifier: String,
pub inactive_opacity: f64,
pub int_grid_values: Vec<IntGridValueDefinition>,
pub parallax_factor_x: f64,
pub parallax_factor_y: f64,
pub parallax_scaling: bool,
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>
WARNING: this deprecated value will be removed completely on version 1.2.0+
Replaced by: tilesetDefUid
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
guide_grid_hei: i64
Height of the optional “guide” grid in pixels
guide_grid_wid: i64
Width of the optional “guide” grid in pixels
hide_fields_when_inactive: bool
§hide_in_list: bool
Hide the layer from the list on the side of the editor view.
identifier: String
User defined unique identifier
inactive_opacity: f64
Alpha of this layer when it is not the active one.
int_grid_values: Vec<IntGridValueDefinition>
An array that defines extra optional info for each IntGrid value.
WARNING: the
array order is not related to actual IntGrid values! As user can re-order IntGrid values
freely, you may value “2” before value “1” in this array.
parallax_factor_x: f64
Parallax horizontal factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
parallax_factor_y: f64
Parallax vertical factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
parallax_scaling: bool
If true (default), a layer with a parallax factor will also be scaled up/down accordingly.
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 default Tileset UID being used by this layer definition.
WARNING: some layer instances might use a different tileset. So most of the time,
you should probably use the __tilesetDefUid
value found in layer instances.
Note:
since version 1.0.0, the old autoTilesetDefUid
was removed and merged into this value.
purple_type: Type
Type of the layer as Haxe Enum Possible values: IntGrid
, Entities
, Tiles
,
AutoLayer
uid: i64
Unique Int identifier