Renderer · function
lodForBounds
The index of the level this object has earned.
Explained in Hello world.
function lodForBounds(bounds: Bounds, model: ReadonlyMat4, eyeX: number, eyeY: number, eyeZ: number, thresholds: readonly number[]): numberimport { lodForBounds } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
bounds | Bounds | |
model | ReadonlyMat4 | |
eyeX | number | |
eyeY | number | |
eyeZ | number | |
thresholds | readonly number[] |
In depth
thresholds are apparent sizes in descending order — the size at which each level stops
being good enough. An object larger than the first threshold gets level 0; one smaller than the
last gets the last level, rather than an index off the end of whatever array the caller is
about to look this up in.
An empty thresholds gives 0, which is the only level a caller with no thresholds has.