Interface: LiquidShellHandle
Handle returned by buildLiquidShell.
Properties
group
group: Group;Root group — attach under the body's group.
mesh
mesh: Mesh;The merged liquid mesh — single draw call, single material.
faceToTileId
faceToTileId: readonly number[];faceToTileId[i] returns the tile id of the i-th triangle.
setTopElevation
setTopElevation: (newTopBand) => void;Re-elevates every prism to a new uniform top band (band space) so the cap surface tracks a moving sea level. Submerged tiles whose base is already at or above the new top end up collapsed.
Parameters
| Parameter | Type |
|---|---|
newTopBand | number |
Returns
void
setBaseElevation
setBaseElevation: (updates) => void;Re-bases the wall start of one or more tiles in band space. Used when the underlying sol cap moves (digging, scripted lift) so the liquid hex follows: a tile dug below the current waterline gains a liquid cap, a tile lifted above it loses it (collapses). Re-uses the last setTopElevation request as the clamp ceiling so the cap top stays on the current sea level after the mutation. Unknown tile ids are silently skipped.
Parameters
| Parameter | Type |
|---|---|
updates | ReadonlyMap<number, number> |
Returns
void
setVisible
setVisible: (on) => void;Toggles mesh visibility.
Parameters
| Parameter | Type |
|---|---|
on | boolean |
Returns
void
setOpacity
setOpacity: (alpha) => void;Updates the alpha in [0, 1]. Syncs the per-body shader uniform.
Parameters
| Parameter | Type |
|---|---|
alpha | number |
Returns
void
setColor
setColor: (color) => void;Live-patches the liquid tint without rebuilding the material. The caller resolves the substance (h2o, ch4, …) and passes the resolved color in any THREE.ColorRepresentation form (hex string, hex int, THREE.Color). The shader's per-fragment colour shifts (foam, depth darken) keep working unchanged — they read the diffuse base after this update.
Parameters
| Parameter | Type |
|---|---|
color | ColorRepresentation |
Returns
void
tick
tick: (elapsed) => void;Advances the wave animation clock.
Parameters
| Parameter | Type |
|---|---|
elapsed | number |
Returns
void
dispose
dispose: () => void;Releases GPU resources.
Returns
void