terrainSize()
The map size generateTerrain builds for complete params: width and depth rounded, at least 8 columns each.
function terrainSize(params?: Partial<TerrainParams>): object;Defined in: index.ts:256
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | Partial<TerrainParams> | Overrides of DEFAULT_TERRAIN (completed first). |
Returns
object
Columns along x and rows along z; heights has width * depth entries.
depth
depth: number;width
width: number;terrainInit()
A terrain as plain data, to rebuild the same Terrain elsewhere (a worker) without regenerating it: its complete params, seed and a copy of its current heights (so the init can be transferred while the terrain stays usable).
topOverrideData()
A top override as data: top evaluated once on every column of terrain, into palette slots indexed x + z width. The result gives the same bricks as the function, in Terrain.fillBrick and FineTerrain.fillBrick (which look top up on coarse columns), and it crosses to a worker.