Skip to content

Interface: SolidShellHandle

Handle returned by buildSolidShell.

Properties

group

ts
group: Group;

Root group — attach under the body's group.


mesh

ts
mesh: Mesh;

The merged ice mesh — single draw call, single material.


faceToTileId

ts
faceToTileId: readonly number[];

Per-triangle tile id lookup — faceToTileId[faceIndex] returns the tile id whose ice prism owns the triangle. Lets callers pick which frozen tile the user clicked on by raycasting against the cap mesh directly (without going through the body's sol interactive layer).

Triangles whose tile has been collapsed via removeTile keep their entry: the lookup remains valid for the lifetime of the handle, but the corresponding triangles are degenerate so the raycaster naturally skips them.


lowerTile

ts
lowerTile: (tileId, bandsDelta) => number | undefined;

Lowers the cap top of tileId by bandsDelta (must be ≥ 0). When the new top reaches the tile's base, the prism collapses into a degenerate shape (no fragments rendered). Returns the new band-space top, or undefined if the tile was unknown / already collapsed.

Parameters

ParameterType
tileIdnumber
bandsDeltanumber

Returns

number | undefined


removeTile

ts
removeTile: (tileId) => void;

Collapses the cap over tileId entirely (equivalent to mining out the full ice column). Idempotent.

Parameters

ParameterType
tileIdnumber

Returns

void


setTopElevation

ts
setTopElevation: (newTopBand) => void;

Re-elevates every still-standing prism to a new uniform top band (band space). Already-collapsed tiles (those whose lowerTile / removeTile brought them to base) are NOT re-extruded — they stay mined out. Useful when a slider drives the canonical sea level and the cap must follow without rebuilding the whole shell.

Parameters

ParameterType
newTopBandnumber

Returns

void


setOpacity

ts
setOpacity: (alpha) => void;

Sets the cap material's alpha in [0, 1]. Values below 1 flip the material to translucent; 1 restores opaque rendering. The handle keeps depthWrite aligned with opacity so transparent caps don't stomp over the underlying mineral floor sort order.

Parameters

ParameterType
alphanumber

Returns

void


dispose

ts
dispose: () => void;

Releases GPU resources. Called by the body's owning lifecycle.

Returns

void

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