API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classInteractionSystem
Routes pointer events from the InputSystem to interactive scene-graph nodes via DOM-style event bubbling. Maintains a persistent dynamic-AABB-tree spatial index of interactive RenderNodes for hit-testing and updates it incrementally - nodes notify the system via the `_notify*` hooks when they enter/leave the scene, change interactivity, or move (causing bounds to dirty). Dispatches InteractionEvents of every type in InteractionEventType: `pointerdown` / `pointerup` / `pointermove` / `pointerover` / `pointerout` / `pointertap` / `contextmenu` / `dragstart` / `drag` / `dragend`. A `pointerdown` on a draggable node only marks a drag candidate; the drag begins once the pointer travels past `ApplicationOptions.input.dragThreshold`. The `contextmenu` event here only fires when a specific interactive node is actually under the pointer; a request over empty space, or one your handler never stops, still reaches `app.input.onContextMenu` - the engine-wide fallback, unconditional and scene-graph-independent. See that Signal's own doc comment for the full two-tier picture. Hit-testing honors a hard `RenderNode.clip` bound to `null` (the node's own world bounds) or a `Rectangle` clipShape - a descendant outside either is never a hit, matching the renderer's own scissor path. A `Geometry` (stencil) clipShape and `RenderNode.mask` (alpha masking) are NOT accounted for: both affect only what is *painted*, not what is *hit-tested*, and an interactive descendant under either stays hittable across its ancestor's full, unclipped bounds. See isWithinClip's doc comment. Constructed automatically by Application; you do not instantiate this class yourself.
import { InteractionSystem } from '@codexo/exojs'Routes pointer events from the InputSystem to interactive scene-graph nodes via DOM-style event bubbling. Maintains a persistent dynamic-AABB-tree spatial index of interactive RenderNodes for hit-testing and updates it incrementally - nodes notify the system via the `_notify*` hooks when they enter/leave the scene, change interactivity, or move (causing bounds to dirty).
Dispatches InteractionEvents of every type in InteractionEventType: `pointerdown` / `pointerup` / `pointermove` / `pointerover` / `pointerout` / `pointertap` / `contextmenu` / `dragstart` / `drag` / `dragend`. A `pointerdown` on a draggable node only marks a drag candidate; the drag begins once the pointer travels past `ApplicationOptions.input.dragThreshold`.
The `contextmenu` event here only fires when a specific interactive node is actually under the pointer; a request over empty space, or one your handler never stops, still reaches `app.input.onContextMenu` - the engine-wide fallback, unconditional and scene-graph-independent. See that Signal's own doc comment for the full two-tier picture.
Hit-testing honors a hard `RenderNode.clip` bound to `null` (the node's own world bounds) or a `Rectangle` clipShape - a descendant outside either is never a hit, matching the renderer's own scissor path. A `Geometry` (stencil) clipShape and `RenderNode.mask` (alpha masking) are NOT accounted for: both affect only what is *painted*, not what is *hit-tested*, and an interactive descendant under either stays hittable across its ancestor's full, unclipped bounds. See isWithinClip's doc comment.
Constructed automatically by Application; you do not instantiate this class yourself.
destroy(): voidfocusInDirection(direction: FocusDirectionA direction for spatial focus navigation - see InteractionSystem.focusInDirection.): voidfocusNext(): voidfocusPrevious(): voidgetHoveredNode(pointerId?: number): RenderNodeSceneNode that can produce visual output. Adds the rendering pipeline features on top of the structural transform/bounds carried by SceneNode: post-process `fi… | nullpopScope(token: object): void