Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InteractionManager

Hierarchy

Index

Constructors

constructor

Properties

Protected _tempPoint

_tempPoint: Point

activeInteractionData

activeInteractionData: object

Type declaration

autoPreventDefault

autoPreventDefault: boolean

currentCursorMode

currentCursorMode: string

currentCursorStyle

currentCursorStyle: string

cursor

cursor: string

cursorStyles

cursorStyles: object

Type declaration

  • default: string
  • pointer: string

defaultCursorStyle

defaultCursorStyle: string

eventData

eventData: InteractionEvent

eventsAdded

eventsAdded: boolean

Protected interactionDOMElement

interactionDOMElement: HTMLElement

interactionDataPool

interactionDataPool: InteractionData[]

interactionFrequency

interactionFrequency: number

mouse

Protected mouseOverRenderer

mouseOverRenderer: boolean

moveWhenInside

moveWhenInside: boolean

Protected onPointerCancel

onPointerCancel: function

Type declaration

    • (event: PointerEvent): void
    • Parameters

      • event: PointerEvent

      Returns void

Protected onPointerDown

onPointerDown: function

Type declaration

    • (event: PointerEvent): void
    • Parameters

      • event: PointerEvent

      Returns void

Protected onPointerMove

onPointerMove: function

Type declaration

    • (event: PointerEvent): void
    • Parameters

      • event: PointerEvent

      Returns void

Protected onPointerOut

onPointerOut: function

Type declaration

    • (event: PointerEvent): void
    • Parameters

      • event: PointerEvent

      Returns void

Protected onPointerOver

onPointerOver: function

Type declaration

    • (event: PointerEvent): void
    • Parameters

      • event: PointerEvent

      Returns void

Protected onPointerUp

onPointerUp: function

Type declaration

    • (event: PointerEvent): void
    • Parameters

      • event: PointerEvent

      Returns void

Protected processPointerCancel

processPointerCancel: function

Type declaration

Protected processPointerDown

processPointerDown: function

Type declaration

Protected processPointerMove

processPointerMove: function

Type declaration

Protected processPointerOverOut

processPointerOverOut: function

Type declaration

Protected processPointerUp

processPointerUp: function

Type declaration

renderer

renderer: SystemRenderer

resolution

resolution: number

supportsPointerEvents

supportsPointerEvents: boolean

supportsTouchEvents

supportsTouchEvents: boolean

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static prefixed

prefixed: string | boolean

Methods

Protected addEvents

  • addEvents(): void
  • Returns void

addListener

  • addListener(event: string | symbol, fn: Function, context?: any): this
  • Alias method for on

    Parameters

    • event: string | symbol
    • fn: Function
    • Optional context: any

    Returns this

Protected configureInteractionEventForDOMEvent

destroy

  • destroy(): void
  • Returns void

Protected dispatchEvent

  • Parameters

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Rest ...args: any[]

      Arguments that are passed to registered listeners

    Returns boolean

    true if the event had listeners, else false.

eventNames

  • eventNames(): Array<string | symbol>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<string | symbol>

Protected getInteractionDataForPointerId

  • Parameters

    • pointerId: number

    Returns InteractionData

hitTest

listeners

  • listeners(event: string | symbol): Function[]
  • listeners(event: string | symbol, exists: boolean): boolean
  • Return the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    Returns Function[]

  • Check if there listeners for a given event. If exists argument is not true lists listeners.

    Parameters

    • event: string | symbol

      The event name.

    • exists: boolean

      Only check if there are listeners.

    Returns boolean

mapPositionToPoint

  • mapPositionToPoint(point: Point, x: number, y: number): void
  • Parameters

    • point: Point
    • x: number
    • y: number

    Returns void

Protected normalizeToPointerData

  • normalizeToPointerData(event: TouchEvent | MouseEvent | PointerEvent): PointerEvent[]
  • Parameters

    • event: TouchEvent | MouseEvent | PointerEvent

    Returns PointerEvent[]

off

  • off(event: string | symbol, fn?: Function, context?: any, once?: boolean): this
  • Alias method for removeListener

    Parameters

    • event: string | symbol
    • Optional fn: Function
    • Optional context: any
    • Optional once: boolean

    Returns this

on

  • on(event: string | symbol, fn: Function, context?: any): this
  • Add a listener for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • fn: Function

      The listener function.

    • Optional context: any

    Returns this

    this.

Protected onPointerComplete

  • onPointerComplete(originalEvent: PointerEvent, cancelled: boolean, func: Function): void
  • Parameters

    • originalEvent: PointerEvent
    • cancelled: boolean
    • func: Function

    Returns void

once

  • once(event: string | symbol, fn: Function, context?: any): this
  • Add a one-time listener for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • fn: Function

      The listener function.

    • Optional context: any

    Returns this

    this.

Protected processInteractive

  • Parameters

    Returns boolean

Protected releaseInteractionDataForPointerId

  • releaseInteractionDataForPointerId(event: PointerEvent): void
  • Parameters

    • event: PointerEvent

    Returns void

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: string | symbol

      The event name.

    Returns this

    this.

Protected removeEvents

  • removeEvents(): void
  • Returns void

removeListener

  • removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): this
  • Remove the listeners of a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Optional fn: Function

      Only remove the listeners that match this function.

    • Optional context: any

      Only remove the listeners that have this context.

    • Optional once: boolean

      Only remove one-time listeners.

    Returns this

    this.

setCursorMode

  • setCursorMode(mode: string): void
  • Parameters

    • mode: string

    Returns void

setMaxListeners

  • setMaxListeners(): this
  • This function doesn't apply anymore.

    deprecated

    Returns this

Protected setTargetElement

  • setTargetElement(element: HTMLCanvasElement, resolution?: number): void
  • Parameters

    • element: HTMLCanvasElement
    • Optional resolution: number

    Returns void

update

  • update(deltaTime?: number): void
  • Parameters

    • Optional deltaTime: number

    Returns void

Generated using TypeDoc