Interface: UseBodyOptions
Optional hooks accepted by 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.
Properties
sunLight?
optional sunLight?:
| PointLight
| DirectionalLight
| null;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).
palette?
optional palette?: TerrainLevel[];hoverChannel?
optional hoverChannel?: HoverChannel;graphicsUniforms?
optional graphicsUniforms?: GraphicsUniforms;quality?
optional quality?: RenderQuality;variation?
optional variation?: BodyVariation;hoverCursor?
optional hoverCursor?: HoverCursorConfig;Hover cursor parameters — single style.
hoverCursors?
optional hoverCursors?: HoverCursorPresets;Hover cursor presets — multiple named styles, swapped at runtime.
defaultCursor?
optional defaultCursor?: string;Initial preset name when hoverCursors is supplied.