Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Controller

Hierarchy

  • EventDispatcher
    • Controller

Index

Constructors

  • Parameters

    Returns Controller

Properties

clock: Clock
layers: BaseLayer[] = []
pointer: Pointer
pointerEventElement?: HTMLElement

Methods

  • addEventListener<T>(type: T, listener: EventListener<Event, T, Controller>): void
  • Adds a listener to an event type.

    Type parameters

    • T: string

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event, T, Controller>

      The function that gets called when the event is fired.

    Returns void

  • Parameters

    Returns void

  • dispatchEvent(event: Event): void
  • Fire an event type.

    Parameters

    • event: Event

    Returns void

  • dispose(): void
  • Returns void

  • getLayer(layerName: string): null | BaseLayer
  • Parameters

    • layerName: string

    Returns null | BaseLayer

  • hasEventListener<T>(type: T, listener: EventListener<Event, T, Controller>): boolean
  • Checks if listener is added to an event type.

    Type parameters

    • T: string

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event, T, Controller>

      The function that gets called when the event is fired.

    Returns boolean

  • onOrientationDevice(): void
  • Returns void

  • onWheel(e: Event): void
  • Parameters

    • e: Event

    Returns void

  • onWindowResize(): void
  • Returns void

  • pointerEvent(e: Event): void
  • Parameters

    • e: Event

    Returns void

  • removeEventListener<T>(type: T, listener: EventListener<Event, T, Controller>): void
  • Removes a listener from an event type.

    Type parameters

    • T: string

    Parameters

    • type: T

      The type of the listener that gets removed.

    • listener: EventListener<Event, T, Controller>

      The listener function that gets removed.

    Returns void

  • removeLayer(layerNmae: string): void
  • Parameters

    • layerNmae: string

    Returns void

  • setPointerEventElement(elm: HTMLElement): void
  • Parameters

    • elm: HTMLElement

    Returns void

  • tick(): void
  • Returns void

Generated using TypeDoc