Talos docs

tilemap

Since 0.6
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. 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.

Rules that can refuse it