API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classInteractionEvent

@codexo/exojs / input / stable

DOM-Event-shaped envelope dispatched by InteractionSystem to interactive scene nodes. Bubbles up the *entire* parent chain - `target` stays pinned to the hit-deepest node while `currentTarget` advances to each ancestor, whether or not that ancestor is itself interactive. Handlers may call InteractionEvent.stopPropagation to halt the bubble. The envelope deliberately exposes no native `PointerEvent`: engine events are frame-synchronous and outlive the platform event they came from. It does have InteractionEvent.preventDefault, but only for suppressing this event's own engine-level default (currently: the automatic drag-candidate creation a `pointerdown` would otherwise start - see that method's own doc comment). It never suppresses a *browser*-native default (touch scrolling, text selection, the native context menu, ...); those are handled separately and synchronously at the `InputSystem` platform-event boundary, before this engine-level event is even constructed.

8
props
2
methods
0
events
Import
import { InteractionEvent } from '@codexo/exojs'

DOM-Event-shaped envelope dispatched by InteractionSystem to interactive scene nodes. Bubbles up the *entire* parent chain - `target` stays pinned to the hit-deepest node while `currentTarget` advances to each ancestor, whether or not that ancestor is itself interactive. Handlers may call InteractionEvent.stopPropagation to halt the bubble.

The envelope deliberately exposes no native `PointerEvent`: engine events are frame-synchronous and outlive the platform event they came from. It does have InteractionEvent.preventDefault, but only for suppressing this event's own engine-level default (currently: the automatic drag-candidate creation a `pointerdown` would otherwise start - see that method's own doc comment). It never suppresses a *browser*-native default (touch scrolling, text selection, the native context menu, ...); those are handled separately and synchronously at the `InputSystem` platform-event boundary, before this engine-level event is even constructed.

Constructors1
Methods2
preventDefault(): void
Suppress this event's own default engine behavior - currently meaningful only for pointerdown, where it suppresses the automatic creation (and so promotion) of a drag candidate for target, on a node whose own draggable would otherwise start one. Independent of InteractionEvent.stopPropagation: propagation still bubbles normally unless that is also called. Also independent of the browser's own native default (e.g. touch scrolling, text selection, the native context menu) - those are suppressed synchronously in InputSystem, at the platform-event boundary, before this engine-level event is even constructed; calling this method has no effect on them.
stopPropagation(): void
Halt further bubbling up the parent chain for this event.
Properties8
x: number
Coordinates in target's own rendering layer - **not** a single fixed space. A hit inside the scene's UI layer reads in screen space (the same space RenderingContext.screenView maps into); a hit against the world tree reads in camera/world space (post pan/zoom/rotate - identical to screen space only at the default centered camera). This matches the space target.position/target.contains() already operate in for whichever layer target lives in, so the two always agree; it is deliberately not Pointer.x/Pointer.y, which is raw design-pixel space and does not track a panned or zoomed camera at all.
y: number
See InteractionEvent.x.
defaultPrevented: boolean
Whether InteractionEvent.preventDefault was called on this event.
propagationStopped: boolean
Source