Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PointerEvent

Pointer events

Represents a mouse, touch, or stylus event. See Pointers for more information on handling pointer input.

For mouse-based events, you can inspect PointerEvent.button to see what button was pressed.

Hierarchy

Index

Constructors

Properties

Constructors

constructor

  • Parameters

    • x: number

      The x coordinate of the event (in world coordinates)

    • y: number

      The y coordinate of the event (in world coordinates)

    • index: number

      The index of the pointer (zero-based)

    • pointerType: PointerType

      The type of pointer

    • button: PointerButton

      The button pressed (if PointerType.Mouse)

    • ev: any

      The raw DOM event being handled

    Returns PointerEvent

Properties

button

The button pressed (if PointerType.Mouse)

ev

ev: any

The raw DOM event being handled

index

index: number

The index of the pointer (zero-based)

pointerType

pointerType: PointerType

The type of pointer

target

target: any

Target object for this event.

x

x: number

The x coordinate of the event (in world coordinates)

y

y: number

The y coordinate of the event (in world coordinates)