Skip to main content

Class: ScenegraphInteractionManager

Defined in: modules/engine/src/scenegraph/scenegraph-interaction.ts:54

Caller-owned hit testing with per-controller hover tracking and subtree event propagation.

Constructors​

Constructor​

new ScenegraphInteractionManager(onEvent): ScenegraphInteractionManager

Defined in: modules/engine/src/scenegraph/scenegraph-interaction.ts:60

Creates a controller that reports bubbled selection and hover events.

Parameters​

onEvent​

(event) => void

Returns​

ScenegraphInteractionManager

Methods​

clearHover()​

clearHover(controllerIndex?): void

Defined in: modules/engine/src/scenegraph/scenegraph-interaction.ts:114

Emits exits for one controller and drops its tracked hover path.

Parameters​

controllerIndex?​

number = 0

Returns​

void


select()​

select<Hit>(hits, controllerIndex?): Hit | undefined

Defined in: modules/engine/src/scenegraph/scenegraph-interaction.ts:65

Selects the first eligible nearest-first hit and bubbles from target to root.

Type Parameters​

Hit​

Hit extends ScenegraphInteractionHit

Parameters​

hits​

readonly Hit[]

controllerIndex?​

number = 0

Returns​

Hit | undefined


updateHover()​

updateHover<Hit>(hits, controllerIndex?): Hit | undefined

Defined in: modules/engine/src/scenegraph/scenegraph-interaction.ts:76

Updates hover from current hits; call after pointer, camera, object, or flag changes.

Type Parameters​

Hit​

Hit extends ScenegraphInteractionHit

Parameters​

hits​

readonly Hit[]

controllerIndex?​

number = 0

Returns​

Hit | undefined