LayerData

A layer of tiles within the map.

A Map layer could be one of: Tile Layer: data is an array of guids that each map to some tile from a TilesetData Object Group: objects is a set of entities that are not necessarily tied to the grid Image Layer: This layer is a static image (e.g. a backdrop)

Members

Enums

Type
enum Type

Identifies what kind of information a layer contains.

Mixins

__anonymous
mixin JsonizeMe
Undocumented in source.

Properties

idxToCol
size_t idxToCol [@property setter]

get the column corresponding to a position in the data or objects array.

idxToRow
size_t idxToRow [@property setter]

get the row corresponding to a position in the data or objects array.

Variables

data
TiledGid[] data;

An array of tile GIDs. Only for tilelayer

drawOrder
string drawOrder;

Not documented by tiled, but may appear in JSON.

name
string name;

Name assigned to this layer

numCols
int numCols;

Number of tile columns. Identical to map width in Tiled Qt.

numRows
int numRows;

Number of tile rows. Identical to map height in Tiled Qt.

objects
ObjectData[] objects;

An array of objects. Only on objectgroup layers.

opacity
float opacity;

Visual opacity of all tiles in this layer

properties
string[string] properties;

Optional key-value properties for this layer

type
Type type;

Category (tile, object, or image)

visible
bool visible;

whether layer is shown or hidden in editor

x
int x;

Horizontal layer offset. Always 0 in Tiled Qt.

y
int y;

Vertical layer offset. Always 0 in Tiled Qt.

Meta