The event boundary which manages this event. Propagation can only occur within the boundary's jurisdiction.
Whether the "alt" key was pressed when this mouse event occurred.
Readonly
Advanced
AT_The event propagation phase AT_TARGET that indicates that the event is at the target.
Flags whether this event bubbles. This will take effect only if it is set before propagation.
Readonly
Advanced
BUBBLING_The event propagation phase BUBBLING_PHASE that indicates that the event is in the bubbling phase.
The specific button that was pressed in this mouse event.
The button depressed when this event occurred.
Readonly
cancelableFlags whether this event can be canceled using FederatedEvent.preventDefault. This is always false (for now).
Readonly
Advanced
CAPTURING_The event propagation phase CAPTURING_PHASE that indicates that the event is in the capturing phase.
The coordinates of the mouse event relative to the canvas.
Whether the "control" key was pressed when this mouse event occurred.
The listeners of the event target that are being notified.
Flags whether the default response of the user agent was prevent through this event.
The units of deltaX
, deltaY
, and deltaZ
. This is one of DOM_DELTA_LINE
,
DOM_DELTA_PAGE
, DOM_DELTA_PIXEL
.
Horizontal scroll amount
Vertical scroll amount
z-axis scroll amount.
This is the number of clicks that occurs in 200ms/click of each other.
The propagation phase.
The pointer coordinates in world space.
Flags whether this is a user-trusted event
The coordinates of the event relative to the nearest DOM layer. This is a non-standard property.
Readonly
managerThe EventBoundary that manages this event. Null for root events.
Whether the "meta" key was pressed when this mouse event occurred.
The movement in this pointer relative to the last mousemove
event.
The native event that caused the foremost original event.
Readonly
Advanced
NONEThe event propagation phase NONE that indicates that the event is not in any phase.
The offset of the pointer coordinates w.r.t. target Container in world space. This is not supported at the moment.
The original event that caused this event, if any.
The coordinates of the event relative to the DOM document. This is a non-standard property.
The composed path of the event's propagation. The target
is at the end.
Flags whether propagation was immediately stopped.
Flags whether propagation was stopped.
This is currently not implemented in the Federated Events API.
The pointer coordinates in the renderer's screen. This has slightly different semantics than native PointerEvent screenX/screenY.
Whether the "shift" key was pressed when this mouse event occurred.
The event target that this will be dispatched to.
The timestamp of when the event was created.
The type of event, e.g. "mouseup"
.
The global Window object.
The pointer coordinates in the renderer's screen. Alias for screen.x
.
The pointer coordinates in the renderer's screen. Alias for screen.y
.
Alias for this.clientX.
Alias for this.clientY.
Advanced
The propagation path for this event. Alias for EventBoundary.propagationPath.
Converts global coordinates into container-local coordinates.
This method transforms coordinates from world space to a container's local space, useful for precise positioning and hit testing.
The local coordinates as a Point object
// Basic usage - get local coordinates relative to a container
sprite.on('pointermove', (event: FederatedMouseEvent) => {
// Get position relative to the sprite
const localPos = event.getLocalPosition(sprite);
console.log('Local position:', localPos.x, localPos.y);
});
// Using custom global coordinates
const customGlobal = new Point(100, 100);
sprite.on('pointermove', (event: FederatedMouseEvent) => {
// Transform custom coordinates
const localPos = event.getLocalPosition(sprite, undefined, customGlobal);
console.log('Custom local position:', localPos.x, localPos.y);
});
Whether the modifier key was pressed when this event natively occurred.
The modifier key.
Prevent default behavior of both PixiJS and the user agent.
Stop this event from propagating to any additional listeners, including those on the current target and any following targets in the propagation path.
Stop this event from propagating to the next target in the propagation path. The rest of the listeners on the current target will still be notified.
A specialized event class for wheel/scroll interactions in PixiJS applications. Extends FederatedMouseEvent to provide wheel-specific properties while maintaining compatibility with the DOM WheelEvent interface.
Key features:
Example
See