TerrainParams
Everything a terrain is made from. Lengths and heights are in voxels (10 per metre); every field has a default in DEFAULTTERRAIN.
Defined in: index.ts:49
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
baseY | number | Mean ground level. | index.ts:57 |
colors? | ColorSet | Role colours; default SUMMER. | index.ts:75 |
depth | number | Extent along z, in columns. | index.ts:53 |
detail | number | Small bumps, in voxels. | index.ts:63 |
dryAbove | number | Ground this far above baseY turns to dry grass. | index.ts:73 |
featureSize | number | Typical hill size in voxels. | index.ts:61 |
height | number | Grid height; the ground stays well below it so trees fit. | index.ts:55 |
relief | number | Hill amplitude: ground ranges about baseY ± relief. | index.ts:59 |
river | RiverParams | The river; merged field by field over the default. | index.ts:67 |
rockSlope | number | Height step to a neighbour at which ground turns to rock. | index.ts:69 |
sandBand | number | Voxels above the water that are sand, near water. | index.ts:71 |
waterLevel | number | Absolute Y of the water surface; columns below it are flooded. | index.ts:65 |
width | number | Extent along x, in columns. | index.ts:51 |
TerrainInit
Everything a Terrain is rebuilt from, as plain data a worker can receive (postMessage structured-clones it; transfer heights.buffer to skip the copy). From terrainInit; rebuild with generateTerrain(init.params, init.seed, { heights: init.heights }).
ColorSet
Colour for every role, keyed by voxel value (a ROLE value).