Class CanvasSandboxHostApplication<TCanvas, TApplicationOptions>Abstract

Base class for multi-process canvas sandbox applications.

Helps in orchestrating the workers.

Type Parameters

Implements

Constructors

Properties

canvas: TCanvas

Usually a hidden canvas that serves as a proxy for canvas sandbox events.

Application options.

paused: boolean = false

Is the application running right now?

random: Random

PRNG instance for the application.

Web worker instances.

Methods

  • Request the application to draw a new frame. This call has no effect in a host application, as all rendering happens in the workers.

    Parameters

    • _delta: number

      How many milliseconds passed since the last frame draw.

    • _timestamp: number

      The current timestamp.

    Returns void