Convert a Tiled JSON tile layer into a 2D row-major grid suitable for meshTilemap / buildTilemapBody.
Only the data, width, and height fields of the layer are read — the helper has no runtime dependency on a Tiled SDK and accepts any object with that shape.
data
width
height
A Tiled tile layer (e.g. map.layers[i] from a Tiled JSON export).
map.layers[i]
A 2D number array, with 0 representing empty tiles.
0
Convert a Tiled JSON tile layer into a 2D row-major grid suitable for meshTilemap / buildTilemapBody.
Only the
data,width, andheightfields of the layer are read — the helper has no runtime dependency on a Tiled SDK and accepts any object with that shape.