Terrain · function

clipmapLevelAt

The level whose drawn patch covers a field cell, or -1 where nothing draws it.

Explained in Terrain.

function clipmapLevelAt(frame: ClipmapFrame, cellX: number, cellZ: number): number
import { clipmapLevelAt } from '@driftengine/terrain';

Parameters

ParameterTypeDescription
frameClipmapFrame
cellXnumber
cellZnumber

In depth

The finest level whose block contains the cell and whose patch there fits on the field. Finest rather than any, because a coarser patch over the same ground is exactly what gets culled.