PatchInput

interface PatchInput
terrainMesh.ts:47

Members

bodyRadiusreadonly

bodyRadius: number

borderreadonly

border: number

Rings of samples outside the patch, as generated.

coverreadonly

cover: Uint8Array

COVER_CHANNELS bytes of surface cover per vertex, row-major, unbordered.

The asymmetry with elevations is deliberate and it is the border's own reason restated: those rings exist to be differenced against, and nothing differences the cover. resolution² entries where the heightfield has (resolution + 2·border)². See cover.ts in packages/universe.

elevationsreadonly

elevations: Float32Array

regionreadonly

resolutionreadonly

resolution: number

Vertices per side of the patch itself, excluding the border.

seaLevelreadonly

seaLevel?: number | null

The elevation of the sea datum, or null where no sheet is drawn.

Null on a dry world and on a mapped one — a photograph's sea is in the photograph — so the caller decides whether a sheet exists and this only decides whether this patch needs one, which is whether the ground under it goes below the datum anywhere.

waterreadonly

water?: Float32Array<ArrayBufferLike> | null

The level of any lake or river over each vertex, resolution² floats unbordered, NaN where there is none — Heightfield.water. Absent or null, the sheet is the sea alone.