Class FederatedMouseEvent

A PIXI.FederatedEvent for mouse events.

Memberof

PIXI

Hierarchy (view full)

Implements

  • MouseEvent

Constructors

Properties

AT_TARGET: 2 = 2
BUBBLING_PHASE: 3 = 3
CAPTURING_PHASE: 1 = 1
NONE: 0 = 0
altKey: boolean

Whether the "alt" key was pressed when this mouse event occurred.

bubbles: boolean

Flags whether this event bubbles. This will take effect only if it is set before propagation.

button: number

The specific button that was pressed in this mouse event.

buttons: number

The button depressed when this event occurred.

cancelBubble: boolean

Deprecated

since 7.0.0

cancelable: false = false

Flags whether this event can be canceled using PIXI.FederatedEvent.preventDefault. This is always false (for now).

client: Point

The coordinates of the mouse event relative to the canvas.

composed: false = false

Flag added for compatibility with DOM {@code Event}. It is not used in the Federated Events API.

ctrlKey: boolean

Whether the "control" key was pressed when this mouse event occurred.

currentTarget: FederatedEventTarget

The listeners of the event target that are being notified.

defaultPrevented: boolean

Flags whether the default response of the user agent was prevent through this event.

detail: number

This is the number of clicks that occurs in 200ms/click of each other.

eventPhase: number

The propagation phase.

Default

{@link PIXI.FederatedEvent.NONE}
global: Point

The pointer coordinates in world space.

isTrusted: boolean

Flags whether this is a user-trusted event

layer: Point

The coordinates of the evnet relative to the nearest DOM layer. This is a non-standard property.

manager: EventBoundary

The PIXI.EventBoundary that manages this event. Null for root events.

metaKey: boolean

Whether the "meta" key was pressed when this mouse event occurred.

movement: Point

The movement in this pointer relative to the last mousemove event.

nativeEvent: MouseEvent | PointerEvent | PixiTouch

The native event that caused the foremost original event.

offset: Point

The offset of the pointer coordinates w.r.t. target DisplayObject in world space. This is not supported at the moment.

originalEvent: FederatedEvent<MouseEvent | PointerEvent | PixiTouch>

The original event that caused this event, if any.

page: Point

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 {@code target} is at the end.

propagationImmediatelyStopped: boolean

Flags whether propagation was immediately stopped.

propagationStopped: boolean

Flags whether propagation was stopped.

relatedTarget: EventTarget

This is currently not implemented in the Federated Events API.

returnValue: boolean

Deprecated

since 7.0.0

screen: Point

The pointer coordinates in the renderer's PIXI.Renderer.screen screen. This has slightly different semantics than native PointerEvent screenX/screenY.

shiftKey: boolean

Whether the "shift" key was pressed when this mouse event occurred.

srcElement: EventTarget

Deprecated

since 7.0.0

The event target that this will be dispatched to.

timeStamp: number

The timestamp of when the event was created.

type: string

The type of event, e.g. {@code "mouseup"}.

view: Window

The global Window object.

which: number

Not supported.

Deprecated

since 7.0.0

Accessors

  • get clientX(): number
  • Returns number

  • get clientY(): number
  • Returns number

  • get data(): this
  • Fallback for the deprecated @code{PIXI.InteractionEvent.data}.

    Returns this

    Deprecated

    since 7.0.0

  • get globalX(): number
  • Returns number

  • get globalY(): number
  • Returns number

  • get layerX(): number
  • Returns number

  • get layerY(): number
  • Returns number

  • get movementX(): number
  • Returns number

  • get movementY(): number
  • Returns number

  • get offsetX(): number
  • Returns number

  • get offsetY(): number
  • Returns number

  • get pageX(): number
  • Returns number

  • get pageY(): number
  • Returns number

  • get screenX(): number
  • The pointer coordinates in the renderer's screen. Alias for {@code screen.x}.

    Returns number

  • get screenY(): number
  • The pointer coordinates in the renderer's screen. Alias for {@code screen.y}.

    Returns number

  • get x(): number
  • Alias for PIXI.FederatedMouseEvent.clientX this.clientX.

    Returns number

  • get y(): number
  • Alias for PIXI.FederatedMouseEvent.clientY this.clientY.

    Returns number

Methods

  • This will return the local coordinates of the specified displayObject for this InteractionData

    Type Parameters

    Parameters

    • displayObject: DisplayObject

      The DisplayObject that you would like the local coords off

    • Optional point: P

      A Point object in which to store the value, optional (otherwise will create a new point)

    • Optional globalPos: IPointData

      A Point object containing your custom global coords, optional (otherwise will use the current global coords)

    Returns P

    • A point containing the coordinates of the InteractionData position relative to the DisplayObject
  • Whether the modifier key was pressed when this event natively occurred.

    Parameters

    • key: string

      The modifier key.

    Returns boolean

  • Unimplemented method included for implementing the DOM interface {@code Event}. It will throw an {@code Error}.

    Parameters

    • _type: string
    • Optional _bubbles: boolean
    • Optional _cancelable: boolean

    Returns void

    Deprecated

  • Not supported.

    Parameters

    • _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

    Returns void

    Deprecated

    since 7.0.0

  • Unimplemented method included for implementing the DOM interface {@code UIEvent}. It will throw an {@code Error}.

    Parameters

    • _typeArg: string
    • Optional _bubblesArg: boolean
    • Optional _cancelableArg: boolean
    • Optional _viewArg: null | Window
    • Optional _detailArg: number

    Returns void

    Deprecated

  • Prevent default behavior of PixiJS and the user agent.

    Returns void

  • Stop this event from propagating to any addition listeners, including on the PIXI.FederatedEventTarget.currentTarget currentTarget and also the following event targets on the propagation path.

    Returns void

  • Stop this event from propagating to the next PIXI.FederatedEventTarget. The rest of the listeners on the PIXI.FederatedEventTarget.currentTarget currentTarget will still be notified.

    Returns void

Generated using TypeDoc