Interface: BodyHover
Controlled hover state — scene controllers drive these from their own raycast events. The body itself never auto-mutates hover state.
Sol hover is rendered as a ring overlay; atmo hover is rendered as a vertex-colour tint on the targeted atmo tile (no extra mesh). The dispatcher setBoardTile routes to the right board based on the BoardTileRef.layer, so callers can forward the result of BodyInteractive.queryHover verbatim.
Methods
setTile()
setTile(id, options?): void;Highlights the given sol tile (or clears highlight when null).
Parameters
| Parameter | Type |
|---|---|
id | number | null |
options? | HoverPlacementOptions |
Returns
void
setBoardTile()
setBoardTile(ref, options?): void;Routes a hover update to the correct board. Pass the result of BodyInteractive.queryHover directly — null clears hover on both boards, a sol ref highlights the sol ring, an atmo ref tints the atmo tile.
Parameters
| Parameter | Type |
|---|---|
ref | BoardTileRef | null |
options? | HoverPlacementOptions |
Returns
void
setBodyHover()
setBodyHover(visible): void;Toggles the body-level hover ring (used when another body is hovered).
Parameters
| Parameter | Type |
|---|---|
visible | boolean |
Returns
void
updateCursor()
updateCursor(config): void;Live mutation of the hover-cursor visuals (ring color / size, emissive color / intensity / size, column color). Disabled primitives (false at build time) cannot be enabled this way — pass them through useBody's hoverCursor/hoverCursors option instead so the GPU resource is allocated up front.
Parameters
| Parameter | Type |
|---|---|
config | HoverCursorConfig |
Returns
void
useCursor()
useCursor(name): void;Switches the active cursor preset by name — must be one of the keys registered in useBody's hoverCursors option (or 'default' when the body was built with the single-cursor hoverCursor shortcut). Throws on unknown names. Each preset is a full HoverCursorConfig — switching applies the entire preset (any primitive not mentioned by the preset falls back to its lib default, NOT the previous preset's value).
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
void
onChange()
onChange(listener): () => void;Subscribes to hovered sol-tile changes — returns an unsubscribe function.
Parameters
| Parameter | Type |
|---|---|
listener | HoverListener |
Returns
() => void