completeTerrainParams()
Params with every default filled in, exactly as generateTerrain merges them: fields from DEFAULTTERRAIN under params, and river merged field by field. Idempotent, and always returns a fresh object (the river too), so the result can be edited or posted.
function completeTerrainParams(params?: Partial<TerrainParams>): TerrainParams;Defined in: index.ts:245
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | Partial<TerrainParams> | Overrides of DEFAULT_TERRAIN. |
Returns
Complete params: what terrainHeight takes and what Terrain.params holds.
buildRoles()
The terrain's role table in voxel-value order, coloured from colors; WATER carries the water material, which the renderer animates. A role colors leaves out shows magenta.
fineTerrainFrom()
Rebuild a fine terrain from fineTerrainInit data, on a worker or anywhere: the coarse terrain from its heights (nothing is resampled) and the refinement over it. Cheap (the cost is one pass over the heights for maxY); every brick then fills byte-identically to the original.