TerrainReport

interface TerrainReport

What a live terrain streamer has, as data.

The host's answer to ir.terrain(). Deliberately not the streamer's own TerrainState: that carries RenderPatch objects full of Float32Arrays, and everything the harness returns is JSON-serializable so a console, a capture script and a test can all read it the same way.

devtools/src/descent.ts:187

Members

bodyreadonly

body: string | null

cachedreadonly

cached: number

Heightfields held, across level changes and origin rebases.

coarseningreadonly

coarsening: number

The multiple of the quality step's cell pixels the last ideal selection was made at — 1 while the budget is not binding, 1.5 and its powers while it is. terrainSelect.ts § COARSEN_STEP.

culledreadonly

culled: number

geometryreadonly

geometry: number

Patch geometries held — the set ready answers from.

Beside cached because the two caches fail differently and only one of them was observable. Refinement is gated on geometry, not on the field, so a geometry cache that loses what the draw set is standing on collapses the selection to the roots while cached sits at its steady value and reports nothing wrong.

lensreadonly

lens: LensView | null

The optics the selection was made against.

Every count below is a function of it — measured, the telephoto end of the field-of-view slider asks for 1.9× to 3.2× what the flight lens does, and terrainSelect.ts says why that is not the square the arithmetic suggests. So a terrain readout without the optics beside it is a number nobody can compare with the one they took yesterday. Null when nothing is being selected: before the host has drawn a frame, and after the streamer lets a body go.

levelreadonly

level: number

Deepest and shallowest levels drawn together this frame.

patchesreadonly

patches: number

Patches with geometry built and placed this frame.

pendingreadonly

pending: number

Patches whose heightfield is out at a worker.

producerreadonly

producer: string

Where the next heightfield request goes: gpu, pool, or none.

The GPU tile producer when the renderer is WebGPU and its kernel built, the worker pool otherwise, and none on a host with neither — which is the headless runner. It reports the next request's route rather than the fields already held, because a producer can stop mid session and the ground on screen came from wherever it came from.

saturatedreadonly

saturated: boolean

True when the patch budget stopped the refinement a level early at the loosest tolerance. The budget binds first by loosening cellPixels, and coarsening below says by how much.

scatterreadonly

scatter: { range: number; regions: number; resolving: number; rocks: number }

The rocks lying on it.

Part of the terrain report rather than a verb of its own, because a scatter count without the ground it is standing on is not a number anyone can act on: resolving above zero and rocks at zero is a field filling in, and the same pair beside starved is a descent outrunning both budgets at once.

range is how far rocks are drawn this frame, which is the lens's own figure — 212 m at the flight lens — and it is here for the same reason lens is: a count taken through a telephoto is not comparable with one taken through the flight lens, and nothing else in this report says so.

selectionsreadonly

selections: number

How many times the quadtree walks have actually run, since the streamer was made.

A total rather than a rate, and that is what makes it readable: the walks are a pure function of the eye, the optics, the level floor and the geometry cache, so a stance or a hover holds all four still and this number stands while the frame count climbs. Two reads a second apart that differ by sixty are a selection recomputed every frame; two that agree are the memo holding. It is also the caveat on every count above: those are from the last walk rather than from this frame, so visited at 446 beside an unchanged selections describes a frame that walked nothing.

shallowestLevelreadonly

shallowestLevel: number

starvedreadonly

starved: number

Nodes drawn coarse because a child's heightfield had not arrived yet.

trianglesreadonly

triangles: number

Triangles in the same set. One draw call per patch, today.

verticesreadonly

vertices: number

Vertices in the drawn set — what the frame's terrain actually costs.

visitedreadonly

visited: number

Nodes the traversal walked, and how many the horizon took.