Constructors

Accessors

  • get delta(): number
  • Get engine's delta time in seconds.

    Returns number

  • get framerate(): number
  • Get current framerate in frames per second.

    Returns number

  • get slow(): number
  • Get slow scaling factor.

    Returns number

  • set slow(value): void
  • Set the slow scaling factor.

    Parameters

    • value: number

    Returns void

  • get timestep(): number
  • Get the current engine's time for a step in seconds (this is the ideal time of a frame).

    Returns number

Methods

  • Fixes the timestep of a given function during the engine's step loop. Used in engine's step method to make fixed steps.

    Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Updates delta time and related variables, used by the engine's step loop.

    Parameters

    • Optionalnow: number

    Returns void