import * as THREE from 'three'; import type { Disposable, FrameContext } from '../types.js'; /** Recipe for {@link createProceduralBody}: radius/detail/seed, body `type`, noise displacement tuning, palette, and water/cloud/ring shells. */ export interface ProceduralBodySpec { radius?: number; /** Icosahedron subdivision. 4 ≈ 5k tris, 5 ≈ 20k. */ detail?: number; seed?: number; type?: 'terrestrial' | 'gas'; /** Peak height as a fraction of radius (terrestrial). */ displacement?: number; frequency?: number; octaves?: number; ridged?: boolean; /** Height palette, low -> high. */ palette?: { low: THREE.ColorRepresentation; mid: THREE.ColorRepresentation; high: THREE.ColorRepresentation; }; water?: { level: number; color: THREE.ColorRepresentation; } | null; clouds?: { coverage?: number; color?: THREE.ColorRepresentation; } | null; rings?: { inner: number; outer: number; color?: THREE.ColorRepresentation; } | null; } /** A generated celestial body. `tick(ctx)` spins it and drifts clouds; `dispose()` frees every shell's geometry and material. */ export interface ProceduralBody extends Disposable { object: THREE.Group; /** Slow cloud drift + body spin. */ tick(ctx: FrameContext): void; } /** * Procedural celestial body: a noise-displaced icosphere terrestrial with * height-palette vertex colors, or a banded gas giant — plus optional water * and cloud shells and rings. Fully seeded and texture-free, so the same * spec always yields the same planet and it works headless. * * @param spec - Body recipe; see {@link ProceduralBodySpec}. * @returns A {@link ProceduralBody}; add `object` to the scene and `tick` it. * @remarks `detail: 4` ≈ 5k triangles, `5` ≈ 20k — geometry cost is * build-time only. * @example * const planet = createProceduralBody({ seed: 7, type: 'terrestrial', water: true }) * scene.add(planet.object) */ export declare function createProceduralBody({ radius, detail, seed, type, displacement, frequency, octaves, ridged, palette, water, clouds, rings, }?: ProceduralBodySpec): ProceduralBody; //# sourceMappingURL=body.d.ts.map