Struct ldtk2::LayerDefinition
source · pub struct LayerDefinition {Show 34 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 auto_tiles_killed_by_other_layer_uid: Option<i64>,
pub biome_field_uid: Option<i64>,
pub can_select_when_inactive: bool,
pub display_opacity: f64,
pub doc: Option<String>,
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 int_grid_values_groups: Vec<IntGridValueGroupDefinition>,
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 render_in_world_view: bool,
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 ui_color: Option<String>,
pub uid: i64,
pub ui_filter_tags: Vec<String>,
pub use_async_render: bool,
}
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 is no longer exported since version 1.2.0 Replaced
by: tilesetDefUid
auto_tiles_killed_by_other_layer_uid: Option<i64>
§biome_field_uid: Option<i64>
§can_select_when_inactive: bool
Allow editor selections when the layer is not currently active.
display_opacity: f64
Opacity of the layer (0 to 1.0)
doc: Option<String>
User defined documentation for this element to provide help/tips to level designers.
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.
int_grid_values_groups: Vec<IntGridValueGroupDefinition>
Group informations for IntGrid values
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)
render_in_world_view: bool
If TRUE, the content of this layer will be used when rendering levels in a simplified way for the world view
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
ui_color: Option<String>
User defined color for the UI
uid: i64
Unique Int identifier
Display tags
use_async_render: bool
Asynchronous rendering option for large/complex layers
Trait Implementations§
source§impl Clone for LayerDefinition
impl Clone for LayerDefinition
source§fn clone(&self) -> LayerDefinition
fn clone(&self) -> LayerDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more