Skip to content

Interface: InteractiveMesh

Public surface of the interactive hex mesh. Exposes reusable primitives (tileGeometry / writeTileColor / computeTileBaseRGB / onHoverChange / surfaceOffset) that any overlay renderer can consume to paint tiles without knowing about the underlying mesh layout.

Extended by

Properties

group

ts
group: Group;

faceToTileId

ts
faceToTileId: number[];

surfaceOffset

ts
surfaceOffset: number;

Baseline radial offset (body-relative) applied to the interactive surface.


setFill

ts
setFill: (on) => void;

Parameters

ParameterType
onboolean

Returns

void


tileGeometry

ts
tileGeometry: (tileId) => TileGeometryInfo | null;

Resolves the geometry context for a tile (tile + terrain level). Returns null when the id is unknown. Consumed by overlay factories such as createTileOverlayMesh.

Parameters

ParameterType
tileIdnumber

Returns

TileGeometryInfo | null


writeTileColor

ts
writeTileColor: (tileId, rgb) => void;

Writes a raw RGB value to every vertex of a tile in the merged color buffer. No palette logic — callers decide the color.

Parameters

ParameterType
tileIdnumber
rgb{ r: number; g: number; b: number; }
rgb.rnumber
rgb.gnumber
rgb.bnumber

Returns

void


tileBaseVisual

ts
tileBaseVisual: (tileId) => TileBaseVisual | null;

Resolves the pre-blend visual snapshot for a tile (palette colour + PBR + emissive + submerged flag). Lets off-lib consumers run their own resource-aware blend without reading the lib's blend internals. Returns null when the tile id is unknown.

Parameters

ParameterType
tileIdnumber

Returns

TileBaseVisual | null


tick

ts
tick: (elapsed) => void;

Advances the per-vertex shader animation clock (call each frame with elapsed seconds).

Parameters

ParameterType
elapsednumber

Returns

void


dispose

ts
dispose: () => void;

Returns

void

Distribué sous la licence indiquée dans le dépôt.