/** * Seeded body generation — turns a seed + {@link ZoneConstraints} into a * deterministic {@link PlanetConfig}. * * Pure-logic module: no `three` import, no Vue, no DOM. Safe to call from * server code, headless workers and the lib's render layer alike. * * # Determinism contract * * Every PRNG consumption inside {@link generateBodyConfig} happens in a * **frozen sequence** (see `// FROZEN ORDER` block in the implementation). * The contract any future contributor must respect: * * 1. **Append, never insert.** New ranges or feature gates always go at * the end of the sequence. Inserting in the middle changes every * downstream value for every existing seed. * 2. **Always consume.** Both range picks and feature-gate rolls draw * from the PRNG even when their result will be discarded (e.g. an * atmosphere range when `features.atmosphere.mode === 'forbidden'`). * This keeps the sequence stable when designers flip a gate's mode * without invalidating the rest of the body. * 3. **Namespace by purpose.** This generator seeds its PRNG with * `seed + ':config'`. The shader-side `generateBodyVariation` uses * `seed + ':var'` (`'var:' + config.name` historically). The two * streams are independent — refactoring one cannot shift the other. * * Breaking any of those rules forces a `genVersion` bump on the consumer * side and re-rolls every persisted body. */ import type { PlanetConfig } from '../types/body/config.types'; import type { ZoneConstraints } from '../types/generation.types'; /** * Generate a deterministic {@link 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. * - `liquidState` is 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. * * @param seed - Stable string driving every random draw. * @param constraints - Generation envelope for the body's zone. * @returns A {@link PlanetConfig} with seed-driven physical and visual * envelope filled, caller-resolved fields left undefined. */ export declare function generateBodyConfig(seed: string, constraints: ZoneConstraints): PlanetConfig; //# sourceMappingURL=generateBodyConfig.d.ts.map