TilemapLayer
Since 0.6
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
name | string | yes | What ctx.tilemap calls it. Unique within the tilemap. | ||
rows | string[] | yes | The cells, one string per row, top row first, one character per cell, every row the same length (tilemap-invalid). A character is a key of the tilemap's legend; "." and " " are empty. At most 1024 rows of 1024 cells (tilemap-too-large). | ||
sortLayer | number | no | The draw layer, -32..32, default 0, on the same scale as a flat sprite's: a sprite on a higher layer is drawn over these tiles, one on a lower layer under them. | ||
order | number | no | The order within sortLayer, -500..500, default 0, as a flat sprite's order. | ||
collision | boolean | no | false | Default false. True: every non-empty cell is solid. The engine merges the solid cells into rectangles and gives the entity one static body of 1 m deep boxes, centred on its XY plane, so a planar character stands on them. The entity then has no collider or rigidbody of its own (tilemap-invalid). | |
visible | boolean | no | true | Default true. False: not drawn (a collision-only layer still collides). |