Skip to main content

PointerAbstraction

Index

Constructors

constructor

Properties

publicevents

events: EventEmitter<PointerEvents> = ...

publiclastPagePos

lastPagePos: Vector = Vector.Zero

The last position on the document this pointer was at. Can be null if pointer was never active.

publiclastScreenPos

lastScreenPos: Vector = Vector.Zero

The last position on the screen this pointer was at. Can be null if pointer was never active.

publiclastWorldPos

lastWorldPos: Vector = Vector.Zero

The last position in the game world coordinates this pointer was at. Can be null if pointer was never active.

Methods

publicemit

  • emit<TEventName>(eventName: TEventName, event: PointerEvents[TEventName]): void
  • emit(eventName: string, event?: any): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • event: PointerEvents[TEventName]

    Returns void

publicoff

  • off<TEventName>(eventName: TEventName, handler: Handler<PointerEvents[TEventName]>): void
  • off(eventName: string, handler: Handler<unknown>): void
  • off(eventName: string): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<PointerEvents[TEventName]>

    Returns void

publicon

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<PointerEvents[TEventName]>

    Returns Subscription

publiconce

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<PointerEvents[TEventName]>

    Returns Subscription