Terrain · function

encodeTerrainHeights

Encode a terrain's samples into a height layer.

Explained in Terrain.

function encodeTerrainHeights(terrain: Terrain): TerrainHeightLayer
import { encodeTerrainHeights } from '@driftengine/terrain';

Parameters

ParameterTypeDescription
terrainTerrain

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.