Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animator

Hierarchy

  • EventDispatcher
    • Animator

Index

Constructors

  • Returns Animator

Properties

animatingCount: number = 0
dataBase: {}

Type declaration

dispatchEvents: Function[] = []
isAnimating: boolean = false
variables: {}

Type declaration

Methods

  • addEventListener<T>(type: T, listener: EventListener<Event, T, Animator>): 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, Animator>

      The function that gets called when the event is fired.

    Returns void

  • animate<T>(name: string, goalValue: T, duration?: number, callback?: Function, easing?: EasingFunc): Promise<unknown>
  • Type parameters

    Parameters

    • name: string
    • goalValue: T
    • duration: number = 1
    • Optional callback: Function
    • Optional easing: EasingFunc

    Returns Promise<unknown>

  • applyToUniforms(uniforms: Uniforms): void
  • Parameters

    Returns void

  • cancelAnimate(name: string): void
  • Parameters

    • name: string

    Returns void

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

    Parameters

    • event: Event

    Returns void

  • get<T>(name: string): null | T
  • Type parameters

    Parameters

    • name: string

    Returns null | T

  • getValueClone<T>(value: T): T
  • Type parameters

    Parameters

    • value: T

    Returns T

  • hasEventListener<T>(type: T, listener: EventListener<Event, T, Animator>): 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, Animator>

      The function that gets called when the event is fired.

    Returns boolean

  • isAnimatingVariable(name: string, mute?: boolean): null | boolean
  • Parameters

    • name: string
    • mute: boolean = false

    Returns null | boolean

  • removeEventListener<T>(type: T, listener: EventListener<Event, T, Animator>): 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, Animator>

      The listener function that gets removed.

    Returns void

  • Parameters

    Returns void

  • setValue<T>(name: string, value: T): undefined | null
  • Type parameters

    Parameters

    • name: string
    • value: T

    Returns undefined | null

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

    • Optional deltaTime: number

    Returns void

  • updateDataBase(target?: string): void
  • Parameters

    • Optional target: string

    Returns void

  • wait(t: number): Promise<void>
  • Parameters

    • t: number

    Returns Promise<void>

Generated using TypeDoc