A SurfaceParameters in a form that survives structured clone.
The seed is the one field that does not: it is four uint32 lanes and it
travels as hex. Everything else is already plain data — the grammar by
construction (SurfaceParameters.grammar), the rest numbers — and goes as
it is, so a field added to the surface crosses the wire without an edit
here. The grammar rides along rather than being looked up because a worker
has no system, no star and no parent planet to derive it from, and shipping
the sketch instead would be kilobytes per patch of something each worker
can rebuild once and keep.
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
Peak-to-datum elevation, meters. grammar.reliefLimit, restated.
roughnessreadonly
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
Ocean datum as a fraction of maxElevation, or null for a dry world.
seedreadonly
Terrain seed of the body's surface, hex.