Skip to main content

Module tileset

Module tileset 

Source
Expand description

3D tile support: a TileSet is a reusable modular kit (floor, wall, corner, ramp …); a TileMap paints cells of one tileset onto an XZ grid.

Convention: cell (x, z) covers the square from (x*cell_w, 0, z*cell_d) to ((x+1)*cell_w, 0, (z+1)*cell_d). Tiles are authored however you like; Tile::offset is applied on top of the cell transform, so a mesh that was modelled around its own centre aligns by offsetting it half a cell.

Structs§

Tile
One variant inside a tileset.
TileCell
A single painted cell. tile indexes TileSet::tiles.
TileMap
Painted grid referencing a tileset. Later entries win; painting an existing cell overwrites it in place.
TileSet
Reusable collection of tiles sharing a grid metric.