Skip to content

FloatingOverlay

Defined in: ui/src/floating.ts:77

One screen-space, top-most overlay per scene that every floating element (tooltip, popover, menu, …) parents into. Decoupled from any single UIRoot: triggers are projected into the overlay’s coordinate space via toLocal, so world-space / camera-transformed triggers anchor correctly, and z-order is managed across all roots. Positioning is delegated to the pure computePosition engine (offset → flip → shift → size); content layout is delegated to a per-handle setLayout callback so the overlay knows nothing about React or specific node types.

new FloatingOverlay(): FloatingOverlay

FloatingOverlay

acquire(): FloatingHandle

Defined in: ui/src/floating.ts:95

FloatingHandle


attach(tree): void

Defined in: ui/src/floating.ts:83

Idempotently ensure the overlay layer exists in this scene’s tree.

SceneRenderTree

void


destroy(): void

Defined in: ui/src/floating.ts:170

void


update(viewport): void

Defined in: ui/src/floating.ts:137

Re-anchor every active float. Driven once per frame after UI layout.

number

number

void