import * as THREE from 'three'; import type { BodyConfig } from '../../types/body.types'; import type { TerrainLevel } from '../types/terrain.types'; import type { Body, InteractiveView } from '../types/bodyHandle.types'; import { type HoverChannel } from '../state/hoverState'; import { type GraphicsUniforms } from '../hex/hexGraphicsUniforms'; import type { RenderQuality } from '../quality/renderQuality'; import type { HoverCursorConfig, HoverCursorPresets } from '../types/hoverCursor.types'; export { tileSizeToSubdivisions, choosePalette, resolveTileHeight, resolveTileLevel, } from './bodyHelpers'; /** * Optional hooks accepted by {@link useBody} — light source, palette * override, hover-cursor presets, render-quality knobs. * * Every field is optional: leaving the object empty (or omitted) yields a * lib-default body. Fields are documented inline so IntelliSense surfaces * the rationale at the call site. */ export interface UseBodyOptions { /** * Light source illuminating the body. On every `tick()`, the lib reads * `sunLight.getWorldPosition()`, computes a normalized planet→sun * direction and pushes it into the body shader (and atmo shell). Pass * a single `PointLight` shared across all bodies of the same star * system — the same instance that lives in the scene as the visible * light source. Bodies without rings or atmosphere simply ignore it * if absent (the shader keeps its last known direction, defaulting to * the +X axis at construction time). */ sunLight?: THREE.PointLight | THREE.DirectionalLight | null; palette?: TerrainLevel[]; hoverChannel?: HoverChannel; graphicsUniforms?: GraphicsUniforms; quality?: RenderQuality; variation?: import('./bodyVariation').BodyVariation; /** Hover cursor parameters — single style. */ hoverCursor?: HoverCursorConfig; /** Hover cursor presets — multiple named styles, swapped at runtime. */ hoverCursors?: HoverCursorPresets; /** Initial preset name when `hoverCursors` is supplied. */ defaultCursor?: string; /** * View applied right after construction. Omitted → the body keeps its * assembled default (smooth display sphere visible, atmo halo shell not * yet mounted). Pass `'shader'` for a ready-to-display overview without * having to call `view.set()` by hand. Ignored by stars (no view switch). */ initialView?: InteractiveView; /** * When `false`, every renderable mesh of the body is made transparent to * scene raycasting (display-only), so a caller can place its own hitbox * and pick it without the atmo shell or smooth sphere intercepting the * ray. Interactive hover queries (hex picking) are unaffected — they run * through a dedicated proxy. Defaults to `true`. */ raycastable?: boolean; } /** * Factory that builds a complete celestial body — hex mesh, interactive * raycast proxy, smooth display mesh, atmosphere glow, rings and effect * layers — deterministically from a {@link BodyConfig}. * * Dispatches to the star sub-builder (which keeps its own smooth + hex * meshes) or to the dual-board planet path (rocky / metallic / gaseous all * share the same sol mesh + atmo board pair). * * @param config - Physics + visual configuration of the body. * @param tileSize - Target world-space tile edge length (drives subdivisions * on both sol and atmo hexaspheres). * @param options - Optional hooks — see {@link UseBodyOptions}. */ export declare function useBody(config: BodyConfig, tileSize: number, options?: UseBodyOptions): Body; //# sourceMappingURL=useBody.d.ts.map