TerrainSelectOptions

interface TerrainSelectOptions
terrainSelect.ts:336

Members

cellPixelsreadonly

cellPixels?: number

coarseningreadonly

coarsening?: number

The multiple of cellPixels to start from — the coarsening the last selection settled at, handed back by a caller that walks every frame.

Starting from 1 every frame is a wasted walk on every frame the cap binds; starting from the last answer is one walk while nothing changes. The caller decides when to try a finer tolerance again, because only it knows how far under the cap the last selection came in.

lensreadonly

lens?: Lens

The lens the picture is taken with. Defaults to the flight lens.

maxLevelreadonly

maxLevel?: number

maxPatchesreadonly

maxPatches?: number

readyreadonly

ready?: (region: RegionAddress) → boolean

Refine only into regions this says are drawable.

The streamer's answer is "its geometry is built" — the mesh rather than the heightfield, because a region whose field has arrived but whose vertices have not is one state() cannot place. Refining into a region that is not drawable is what produces a hole; stopping at the parent produces a coarser picture of the same ground, which is what a descent should look like while it loads. Omitted means everything is ready, which is the question the request set asks.

resolutionreadonly

resolution?: number

viewportreadonly

viewport?: Viewport

The picture's size in display pixels.

Not the drawing buffer's. Supersampling raises the sample count, not the detail a viewer can resolve, so feeding a 4× AA buffer height in here asks for 6.5× the patches to draw geometry the resolve filter averages away. The caller divides its own factor out; the place to spend on sharper terrain is cellPixels, where it is a decision with a number on it.