TerrainBuild
Options of generateTerrain.
Defined in: index.ts:105
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
heights? | Int16Array<ArrayBufferLike> | Precomputed ground heights (width * depth, x + z * width), used as they are instead of sampling the height function: typically a TerrainInit's levelled heights, so a worker rebuilds the same Terrain without regenerating it. Adopted, not copied: the terrain's heights is this array. | index.ts:112 |
Terrain
A generated region, from generateTerrain. Everything reads the editable heights map, so levelling a pad into it changes the surface, the roles, fillBrick and pick together. Coordinates are voxels; columns outside the map clamp to its edge.
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 }).