Options
All
  • Public
  • Public/Protected
  • All
Menu

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

constructor

Properties

Protected _name

_name: string

button

The button pressed (if PointerType.Mouse)

Protected coordinates

coordinates: GlobalCoordinates

The GlobalCoordinates of the event

ev

ev: any

The raw DOM event being handled

index

index: number

The index of the pointer (zero-based)

other

other: T | null

Other target object for this event

pointer

pointer: Pointer

The Pointer of the event

pointerType

pointerType: PointerType

The type of pointer

target

target: Actor

Target object for this event.

Accessors

bubbles

  • get bubbles(): boolean
  • set bubbles(value: boolean): void
  • If set to false, prevents event from propagating to other actors. If true it will be propagated to all actors that apply.

    Returns boolean

  • If set to false, prevents event from propagating to other actors. If true it will be propagated to all actors that apply.

    Parameters

    • value: boolean

    Returns void

name

  • get name(): string

pagePos

pos

screenPos

worldPos

Methods

Protected _onActionEnd

  • _onActionEnd(_actor?: Actor): void

Protected _onActionStart

  • _onActionStart(_actor?: Actor): void

doAction

  • doAction(actor: Actor): void

propagate

  • propagate(actor: Actor): void

stopPropagation

  • stopPropagation(): void