OptionalnoiseOptionalperturbOptionalelevationOptionalsurfaceOptionalwaterSet of terrain indices that count as water. Defaults to {5} (built-in Water).
OptionalallSet of ALL liquid terrain indices across every liquid type.
When provided, river geometry is only built for river cells that drain into
a terrain in waterTerrains. Cells draining into a different liquid type
(in allLiquidTerrains but not waterTerrains) are skipped so each liquid type
only owns the rivers that flow into it.
OptionalterrainTerrain-mesh noise parameters, matching the ChunkGeometryOptions used to build the terrain. Land-side shore/estuary vertices and river channels are perturbed with these — not the liquid's own noiseScale/perturbStrength — so they stay glued to the terrain even when a liquid overrides its surface noise settings. ChunkManager injects these automatically from its geometryOptions.
OptionalterrainOptionalterrainOptionalownsWhen true, this liquid also renders river chains whose drainage target could not be classified (the river dries out on land, leaves the map, or exceeds the trace limit). ChunkManager sets this on exactly one liquid — the highest-priority one with a river material — so unclassified rivers are drawn once instead of once per liquid type. Ignored when allLiquidTerrains is unset (single-liquid backward-compat mode renders everything).
OptionalliquidTerrain index → liquid priority (the lowest terrain index of the liquid that index belongs to). Used at liquid-liquid boundaries so liquids spanning multiple terrain indices compare at the liquid level. Falls back to the raw terrain index when absent.
OptionalriverCells (row * width + col) whose river channels this liquid should render — the pre-computed ownership set from ChunkManager's map-wide river classification cache. When provided, buildRiverGeometry skips its own per-chunk drainage tracing entirely.
OptionaldepthShore distance (in cells) at which the surface reaches full deep color. Depth blends the larger of bathymetric depth and shore-distance depth, so both carved basins and wide bodies read as deep. Default 6.
OptionalcliffElevation difference at which a river edge renders as a waterfall (level lip + steep drop) instead of one smooth slope. Should match the terrain's ChunkGeometryOptions.cliffThreshold; ChunkManager injects it. Default 2.
OptionalriverAccumulated river flow per cell (cellKey → flow, from computeRiverFlow).
When provided, river channels widen with flow (see RiverWidth.ts). Must be
the SAME map passed to buildChunkGeometry so the carved stream bed
widens in lockstep. ChunkManager injects its cached flow automatically.
OptionalriverCarved river elevation per cell (cellKey → elevation, from
computeRiverElevations): the running minimum along flow. When provided,
the river surface holds the carried level through uphill stretches
(whose terrain carves a gorge) instead of climbing them. Must be the
SAME map passed to buildChunkGeometry. ChunkManager injects it
automatically.
Constant world-space Y added to every water surface position after the elevation scale is applied. Prevents z-fighting between the water mesh and coplanar terrain (e.g. a cell at elevation 0 connected to the ocean). Default 0.02.