Function: useBody()
ts
function useBody(
config,
tileSize,
options?): Body;Factory that builds a complete celestial body — hex mesh, interactive raycast proxy, smooth display mesh, atmosphere glow, rings and effect layers — deterministically from a 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).
Parameters
| Parameter | Type | Description |
|---|---|---|
config | BodyConfig | Physics + visual configuration of the body. |
tileSize | number | Target world-space tile edge length (drives subdivisions on both sol and atmo hexaspheres). |
options? | UseBodyOptions | Optional hooks — see UseBodyOptions. |