tilesetHexGeometry
tilesetHexGeometry(
manifest,grid?):object
Defined in: packages/declarative-hex-worlds/src/asset-source/tileset.ts:68
Derive the board PLACEMENT geometry a tileset needs for seamless quad
tessellation, from the manifest’s cell aspect. Pass the result to
<HexWorld geometry> (or projectWorldToGameboardPlan({ geometry })).
Why row spacing must change: a full-cell quad’s Z-extent is
height = width · cellHeight/cellWidth (the baked cell aspect). For pointy-top
quads to interlock, adjacent ROWS must be height/2 apart. rowSpacingForGeometry
computes 1.5·(depth/2), so we invert: depth = (height/2)/0.75 = (2/3)·height.
The default regular-hex depth (≈2.3094) spreads rows ~3× too far in Z, leaving the
blue gaps between tiles. Width + elevationStep stay at the board defaults.
Uses the first sheet’s grid for the aspect (all sheets in a coherent pack share a
cell size); pass a specific grid to override.
Parameters
Section titled “Parameters”manifest
Section titled “manifest”biomes
Section titled “biomes”Record<string, { select: "first" | "hash"; sheet: string; }> = ...
"tileset" = ...
schemaVersion
Section titled “schemaVersion”string = ...
sheets
Section titled “sheets”Record<string, { edgeCells?: Record<string, number>; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; role: "transition" | "fill"; url: string; variants?: number[]; }> = ...
cellHeight
Section titled “cellHeight”number = ...
cellWidth
Section titled “cellWidth”number = ...
number = ...
number = ...
Returns
Section titled “Returns”object
depth:
number
elevationStep
Section titled “elevationStep”elevationStep:
number
width:
number