Fields

y:Int

Vertical layer offset in tiles. Always 0.

x:Int

Horizontal layer offset in tiles. Always 0.

width:Int

Column count. Same as map width for fixed-size maps.

visible:Bool

Whether layer is shown or hidden in editor

type:String

"tilelayer", "objectgroup", "imagelayer" or "group"

transparentcolor:String

Hex-formatted color ("#RRGGBB") (optional). imagelayer only.

tintcolor:String

Hex-formatted tint color ("#RRGGBB" or "#AARRGGBB") that is multiplied with any graphics drawn by this layer or any child layers (optional).

starty:Int

Y coordinate where layer content starts (for infinite maps)

startx:Int

X coordinate where layer content starts (for infinite maps)

repeaty:Bool

Whether the image drawn by this layer is repeated along the Y axis. type == "imagelayer" only. (since Tiled 1.8)

repeatx:Bool

Whether the image drawn by this layer is repeated along the X axis. type == "imagelayer" only. (since Tiled 1.8)

properties:Array<TiledProperty>

Array of Properties

parallaxy:Float

Vertical parallax factor for this layer (default: 1). (since Tiled 1.5)

parallaxx:Float

Horizontal parallax factor for this layer (default: 1). (since Tiled 1.5)

opacity:Float

Value between 0 and 1

offsety:Float

Vertical layer offset in pixels (default: 0)

offsetx:Float

Horizontal layer offset in pixels (default: 0)

objects:Array<TiledObject>

Array of TiledObject. type == "objectgroup" only.

name:String

Name assigned to this layer

locked:Bool

Whether layer is locked in the editor (default: false). (since Tiled 1.8.2)

layers:Array<TiledLayer>

Array of TiledLayer. type == "group" only.

image:String

Image used by this layer. type == "imagelayer" only.

id:Int

Incremental ID - unique across all layers

height:Int

Row count. Same as map height for fixed-size maps.

encoding:String

"csv" (default) or "base64". type == "tilelayer" only.

draworder:String

"topdown" (default) or "index". type == "objectgroup" only.

data:Dynamic

Array of unsigned int (GIDs) or base64-encoded data(string). type == "tilelayer" only.

compression:String

"zlib", "gzip", "zstd" (since Tiled 1.3) or empty (default). type == "tilelayer" only.

chunks:Array<TiledChunk>

Array of chunks (optional). type == "tilelayer" only.

_class:String

The class of the layer (since 1.9, optional)