Options
All
  • Public
  • Public/Protected
  • All
Menu

Manage the timers and times elapsed during last frame, since the beginning of the scene and other time related values.

Hierarchy

  • TimeManager

Index

Methods

  • addTimer(name: string): void
  • getElapsedTime(): number
  • Return the time elapsed since the last call to update (i.e: the last frame), in milliseconds.

    Returns number

  • getTimeFromStart(): number
  • Get the time since the instanciation of the manager (i.e: since the beginning of the scene most of the time), in milliseconds.

    Returns number

  • getTimeScale(): number
  • getTimer(name: string): Timer
  • hasTimer(name: string): boolean
  • isFirstFrame(): boolean
  • Return true if update was called only once (i.e: if the scene is rendering its first frame).

    Returns boolean

  • removeTimer(name: string): void
  • reset(): void
  • setTimeScale(timeScale: number): void
  • Set the time scale: time will be slower if time scale is < 1, faster if > 1.

    Parameters

    • timeScale: number

      The new time scale (must be positive).

    Returns void

  • update(elapsedTime: number, minimumFPS: number): void

Constructors

Generated using TypeDoc