PIXI.FederatedMouseEvent
class FederatedMouseEvent extends PIXI.FederatedEvent implements MouseEvent
A PIXI.FederatedEvent for mouse events.
Constructor
new PIXI.FederatedMouseEvent() → {}
Summary
Properties from FederatedMouseEvent
| boolean |
Whether the "alt" key was pressed when this mouse event occurred. |
| number |
The specific button that was pressed in this mouse event. |
| number |
The button depressed when this event occurred. |
| PIXI.Point |
The coordinates of the mouse event relative to the canvas. |
| number |
|
| number |
|
| boolean |
Whether the "control" key was pressed when this mouse event occurred. |
| number |
This is the number of clicks that occurs in 200ms/click of each other. |
| PIXI.Point |
The pointer coordinates in world space. |
| number |
|
| number |
|
| boolean |
Whether the "meta" key was pressed when this mouse event occurred. |
| PIXI.Point |
The movement in this pointer relative to the last |
| number |
|
| number |
|
| PIXI.Point |
|
| number |
|
| number |
|
| EventTarget |
This is currently not implemented in the Federated Events API. |
| PIXI.Point |
|
| number |
|
| number |
|
| boolean |
Whether the "shift" key was pressed when this mouse event occurred. |
| number |
|
| number |
|
Methods from FederatedMouseEvent
Properties inherited from FederatedEvent
| boolean |
Flags whether this event bubbles. This will take effect only if it is set before propagation. |
| boolean |
|
| boolean |
|
| boolean |
|
| PIXI.FederatedEventTarget |
The listeners of the event target that are being notified. |
| this |
|
| boolean |
Flags whether the default response of the user agent was prevent through this event. |
|
|
|
| boolean |
Flags whether this is a user-trusted event |
| PIXI.Point |
The coordinates of the evnet relative to the nearest DOM layer. This is a non-standard property. |
| number |
|
| number |
|
| PIXI.EventBoundary |
The EventBoundary that manages this event. Null for root events. |
| N |
The native event that caused the foremost original event. |
| PIXI.FederatedEvent<N> |
The original event that caused this event, if any. |
| PIXI.Point |
The coordinates of the event relative to the DOM document. This is a non-standard property. |
| number |
|
| number |
|
| PIXI.FederatedEventTarget[] |
The composed path of the event's propagation. The |
| boolean |
Flags whether propagation was immediately stopped. |
| boolean |
Flags whether propagation was stopped. |
| boolean |
|
| EventTarget |
|
| PIXI.FederatedEventTarget |
The event target that this will be dispatched to. |
| number |
The timestamp of when the event was created. |
| string |
The type of event, e.g. |
| WindowProxy |
The global Window object. |
| number |
|
Methods inherited from FederatedEvent
| PIXI.FederatedEventTarget[] |
The propagation path for this event. Alias for EventBoundary.propagationPath. |
| void |
|
| void |
Prevent default behavior of PixiJS and the user agent. |
| void |
|
| void |
|
Public Properties
altKey: boolean
Whether the "alt" key was pressed when this mouse event occurred.
button: number
The specific button that was pressed in this mouse event.
client: PIXI.Point
The coordinates of the mouse event relative to the canvas.
clientX: number
clientY: number
ctrlKey: boolean
Whether the "control" key was pressed when this mouse event occurred.
detail: number
This is the number of clicks that occurs in 200ms/click of each other.
globalX: number
globalY: number
metaKey: boolean
Whether the "meta" key was pressed when this mouse event occurred.
movement: PIXI.Point
The movement in this pointer relative to the last mousemove event.
movementX: number
movementY: number
offset: PIXI.Point
The offset of the pointer coordinates w.r.t. target DisplayObject in world space. This is not supported at the moment.
offsetX: number
offsetY: number
screen: PIXI.Point
The pointer coordinates in the renderer's screen. This has slightly different semantics than native PointerEvent screenX/screenY.
screenX: number
The pointer coordinates in the renderer's screen. Alias for screen.x.
screenY: number
The pointer coordinates in the renderer's screen. Alias for screen.y.
shiftKey: boolean
Whether the "shift" key was pressed when this mouse event occurred.
Public Methods
getModifierState(key: string) → {boolean}
Whether the modifier key was pressed when this event natively occurred.
| Name | Type | Description |
|---|---|---|
| key | string |
The modifier key. |
| Type | Description |
|---|---|
| boolean |
initMouseEvent(_typeArg: string, _canBubbleArg: boolean, _cancelableArg: boolean, _viewArg: Window, _detailArg: number, _screenXArg: number, _screenYArg: number, _clientXArg: number, _clientYArg: number, _ctrlKeyArg: boolean, _altKeyArg: boolean, _shiftKeyArg: boolean, _metaKeyArg: boolean, _buttonArg: number, _relatedTargetArg: EventTarget) → {void}
Not supported.
| Name | Type | Description |
|---|---|---|
| _typeArg | string | |
| _canBubbleArg | boolean | |
| _cancelableArg | boolean | |
| _viewArg | Window | |
| _detailArg | number | |
| _screenXArg | number | |
| _screenYArg | number | |
| _clientXArg | number | |
| _clientYArg | number | |
| _ctrlKeyArg | boolean | |
| _altKeyArg | boolean | |
| _shiftKeyArg | boolean | |
| _metaKeyArg | boolean | |
| _buttonArg | number | |
| _relatedTargetArg | EventTarget |
| Type | Description |
|---|---|
| void |