Class App<G>Abstract

Base application.

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

animationFrameID?: number
changeTracker: ChangeTracker = ...
driver: G
lastAnimationFrameTimestamp?: number
tickers: Tickers = ...

Accessors

Methods

  • Initialize all systems.

    Returns Promise<void>

  • Initialize all systems and start the app loop.

    Returns Promise<void>

  • Called for every animation frame.

    Parameters

    • timestamp: number

      requestAnimationFrame timestamp

    Returns void

    Must request another animation frame.

  • Called when the app decides a render is needed. Depends on renderMode.

    Returns void

    This should only contain actual rendering code. Any logic should be put into tickers.

  • Called for every tick. A tick does not equal a render.

    Parameters

    • elapsed: number

      Elapsed time in milliseconds.

    Returns void

    This should only contain app-management code, actual logic should be put into tickers.