Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

TiledLayer

One of Tiled’s tile layers, ready to spread on a TileMapLayer.

Property Type Default value Description Overrides
id number undefined Tiled’s layer id, unique in the map: the React key. -
name string undefined Its name, with its groups’ names before it, as town/walls. -
plane Plane2D Plane2D.Ground The plane it lies in, which the scene’s Camera2D must name too: columns run along +x, and rows along +z on the ground or down -y on the side plane. TileLayerOptions.plane
position Position [0, 0, 0] Where cell [0, 0]’s top-left corner stands, as Godot’s, Unity’s and Phaser’s tile maps place their first cell at their origin. TileLayerOptions.position
properties TiledProperties undefined - -
sortingLayer number 0 The layer’s sortingLayer property in Tiled, an int, such as 1 for a roof that covers the characters. TileLayerOptions.sortingLayer
sortingOrder number 0 Its order within its band, a whole number from -64 to 63, a sprite’s range, lower first: readTiledMap numbers a band’s layers in Tiled’s order from -64. TileLayerOptions.sortingOrder
tiles TileRows undefined - -
tileSet readonly TileSet[] undefined The tile set its cells name, or several, which a cell names by its place in the list. Every set of a layer has one tile size. TileLayerOptions.tileSet
visible boolean true Whether it draws. A hidden layer keeps its colliders, as Tiled’s hidden collision layer does. TileLayerOptions.visible