Function: generateBodyConfig()
ts
function generateBodyConfig(seed, constraints): PlanetConfig;Generate a deterministic PlanetConfig from a seed and zone constraints. The same (seed, constraints) pair always yields the same config, byte-stable across runtimes (the underlying PRNG is integer-only SplitMix32 with FNV-1a-hashed string seed — no floating-point divergence).
Caller-resolved fields are intentionally left undefined on the returned config:
liquidColor,bandColors,metallicBands,terrainColorLow/High— derived from chemistry / temperature, owned by caller code.liquidStateis set to'liquid'or'none'only. Promoting to'frozen'requires temperature knowledge the lib does not carry; the caller downgrades after this call when its thermal model says so.gasMassFraction,spectralType— outside v1 scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
seed | string | Stable string driving every random draw. |
constraints | ZoneConstraints | Generation envelope for the body's zone. |
Returns
A PlanetConfig with seed-driven physical and visual envelope filled, caller-resolved fields left undefined.