Talos docs

tilemap

Since 0.6Changed in next
Plain text

Use it in a scene entity's components list as { "type": "tilemap", … }. The contract writes the fields flat and refuses unknown keys.

Fields

FieldTypeRequiredDefaultAllowed valuesDescription
tilesetTilemapTilesetyes
legendobjectyesWhich tile each character of the rows draws: one character (not "." or " ", which are empty) to a tile index of the tileset, a whole number from 0, or to an object { tile, flipX?, flipY?, rot? } that draws the tile mirrored and/or turned (rot 0, 90, 180 or 270). A row character that is not a key is tilemap-tile-unknown.
layersTilemapLayer[]yesAt least one, at most 16, drawn in sortLayer / order. Layers may differ in size; all share the entity's origin and cellSize. At most 1,048,576 cells over all layers (tilemap-too-large).
cellSizeVec2no[width, height] of one cell in metres, above zero; the entity's scale multiplies it. Default: the tile's pixels at 100 pixels a metre, a sprite's default pixelsPerMetre (16 px tiles are 0.16 m).
alphaCutoffnumberno0..1, default 0.5: a tile pixel whose alpha is below it is not drawn.
filterSpriteFilternonearest, linear"nearest" (hard pixel edges) or "linear". Absent: the scene's meta.render.filter, as for sprites.
litbooleannoDefault false: tiles drawn as painted (unlit), with fog. True: lit by the scene's lights as a surface facing +Z, with the tileset's normalImage if it has one.

Rules that can refuse it