Interface: StarBody
Handle returned by useBody() for 'star'. Stars carry no liquid, no atmosphere shell, no view toggle and no layered tile mutations — the corresponding namespaces are simply absent on the type, so callers narrow the union via body.kind === 'star'.
Extends
Properties
group
group: Group;Inherited from
sim
sim: BodySimulation;Inherited from
palette
palette: TerrainLevel[];Inherited from
variation
variation: BodyVariation;Inherited from
tileCount
tileCount: number;Number of sol tiles generated by the hexasphere.
Inherited from
shadowUniforms
shadowUniforms: ShadowUniforms;Inherited from
occluderUniforms
occluderUniforms: OccluderUniforms;Inherited from
planetMaterial
planetMaterial: BodyMaterial;Inherited from
hoverChannel
hoverChannel: HoverChannel;Inherited from
graphicsUniforms
graphicsUniforms: GraphicsUniforms;Inherited from
interactive
interactive: BodyInteractive;Inherited from
hover
hover: BodyHover;Inherited from
kind
kind: "star";Discriminant — narrows the union Body to the star branch.
config
config: StarConfig;Narrowed to the star branch of BodyConfig.
Overrides
tiles
tiles: StarTiles;Methods
tick()
tick(dt): void;Parameters
| Parameter | Type |
|---|---|
dt | number |
Returns
void
Inherited from
dispose()
dispose(): void;Returns
void
Inherited from
warmup()
warmup(
renderer,
camera,
options?): Promise<void>;Pre-compiles every shader the body relies on, exploiting KHR_parallel_shader_compile when available so the CPU stays responsive while the GPU driver links programs in the background.
Call once after useBody() and before the first render — the caller is expected to keep a loader / skeleton visible until the promise resolves. Subsequent calls are inexpensive (Three.js caches compiled programs by material identity).
onProgress fires at each phase boundary — at the start (collecting), after every compile resolves, and at the end (done). Use it to drive a loading bar or a status string. Phase codes are stable across lib versions; see WarmupPhase.
Multi-camera scenes only need a single warmup pass — Three.js compiled programs are not bound to a specific camera matrix.
Parameters
| Parameter | Type | Description |
|---|---|---|
renderer | WebGLRenderer | Renderer that owns the WebGL context. Programs are compiled into this renderer's program cache. |
camera | Camera | Camera used to derive view-dependent uniforms during compilation. Any scene camera works. |
options? | WarmupOptions | Optional progress hook. |
Returns
Promise<void>
Inherited from
getCoreRadius()
getCoreRadius(): number;World radius of the opaque inner core sphere (radius * coreRadiusRatio).
Returns
number
Inherited from
getSurfaceRadius()
getSurfaceRadius(): number;World radius of the outer surface (= config.radius).
Returns
number