Terrain · function

terrainFromHeightLayer

The terrain a layer describes: the same class every consumer already queries, built from the decoded samples.

Explained in Terrain.

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

Parameters

ParameterTypeDescription
layerTerrainHeightLayer

In depth

This is the whole answer to "collision and rendering read the same height". They read the same object, because the layer produces exactly one.