voxolith
API reference@voxolith/gen-terrainFunctions

terrainHeight()

The height function on its own: pure in (x, z), for a world that streams columns without ever sampling the whole map. Gives exactly the values generateTerrain samples into heights, before any editing.

function terrainHeight(params: TerrainParams, seed: number): (x: number, z: number) => number;

Defined in: index.ts:191

Parameters

ParameterTypeDescription
paramsTerrainParamsComplete params (completeTerrainParams fills the defaults).
seednumberThe same seed as the terrain it should match.

Returns

Ground height (top solid voxel) of a column, rounded.

(x: number, z: number) => number

On this page