A map of IntGrid values to IntGrid value definitions.
The definition contains the editor color and optional identifier.
This is only populated if Layer.type is IntGrid
.
Non-null if this.type === "AutoLayer"
Non-null if this.type === "Entities"
Size of a grid cell.
Refers to both the width and height.
Non-null if this.type === "Tiles"
This contains the values from the IntGrid, but stored in a 2D array.
const layer: Layer = new Layer(...);
const grid = layer.intGridXY;
for (let x = 0; x < grid.length; ++x) {
for (let y = 0; y < grid[x].length; ++y) {
doSomethingWith(grid[x][y]);
}
}
Non-null if this.type === "IntGrid"
Parent Level
Layer opacity
Total layer pixel offset, including both instance and definition offsets.
Grid-based width/height.
Optional tileset used to render the layer
Layer type, possible values: AutoLayer
, Entities
, Tiles
, IntGrid
Unique Int identifier
Generated using TypeDoc
Layers support different kinds of data, specifically:
Visit https://ldtk.io/docs/general/editor-components/layers/ for more information about layers.