inferTilesetGrid
inferTilesetGrid(
dimensions,cols,rows):object
Defined in: packages/declarative-hex-worlds/src/asset-source/png-dimensions.ts:61
Infer a tileset grid from the atlas dimensions + a known column/row count. The
common case: the author knows the sheet is cols × rows cells (the CLI takes
--cols/--rows), and the cell size is the exact integer division of the atlas.
Throws if the dimensions don’t divide evenly — a mismatch means the cols/rows are
wrong and the emitted grid would mis-slice every cell.
Parameters
Section titled “Parameters”dimensions
Section titled “dimensions”number
number
Returns
Section titled “Returns”object
cellHeight
Section titled “cellHeight”cellHeight:
number
cellWidth
Section titled “cellWidth”cellWidth:
number
cols:
number
rows:
number