SurfaceParameters

interface SurfaceParameters

Terrain generation parameters. The heightfield itself is never stored.

universe/src/system.ts:245

Members

grammarreadonly

Which bands the terrain has and how loud each is.

Derived from the body's own facts, never persisted — a save stores an address and the grammar comes back with the body. It rides on the surface rather than being looked up from the Body because elevationAt runs in a worker, and a worker has no system, no star and no parent planet. That is also why it is plain data: the heightfield task posts it across a structured clone.

maxElevationreadonly

maxElevation: number

Peak-to-datum elevation, meters. grammar.reliefLimit, restated.

roughnessreadonly

roughness: number

Base spatial frequency of the relief band, cycles per body radius.

One band of six rather than the whole field: it sets reliefBand's cycle count and nothing else reads it. Every other band's scale comes from the grammar — a crater ladder from the largest crater, an orogen from BELT_MARGIN, a hotspot from the plate count — because those are properties of the geology rather than a dial on the noise.

seaLevelreadonly

seaLevel: number | null

Ocean datum as a fraction of maxElevation, or null for a dry world.

seedreadonly

seed: Seed