Skip to content

Function: createHoverChannel()

ts
function createHoverChannel(): HoverChannel;

Builds a fresh HoverChannel. Each call returns an independent set of refs so a multi-body scene can give every body its own channel:

ts
const mars  = useBody(marsConfig,  tileSize)   // channel auto-created
const venus = useBody(venusConfig, tileSize)   // its own channel

<TileCenterProjector :channel="mars.hoverChannel"  ... />
<TileCenterProjector :channel="venus.hoverChannel" ... />

Callers that want a shared global slot (single popover UX, single tooltip in the HUD) build one channel up-front and pass it to every body via the hoverChannel option of useBody.

Returns

HoverChannel

Distribué sous la licence indiquée dans le dépôt.