Terrain · function
encodeTerrainHeights
Encode a terrain's samples into a height layer.
Explained in Terrain.
function encodeTerrainHeights(terrain: Terrain): TerrainHeightLayerimport { encodeTerrainHeights } from '@driftengine/terrain';Parameters
| Parameter | Type | Description |
|---|---|---|
terrain | Terrain |
In depth
The range is the field's own, not a fixed world range: a valley two metres deep quantised against a range of four kilometres is a staircase, and terrain is where that is most visible because a shallow slope magnifies a step in height into a wide flat shelf.