The Camera component controls what layers and objects are rendered to the screen.
It supports multiple render layers, zoom level control, and depth ordering when using multiple cameras.
Each camera can also optionally render debug information for development purposes.\

const camera = new Camera({
layers: ["Default", "UI", "Background"],
zoom: 1.5,
depth: 0,
debug: true
});

Constructors

Properties

Constructors

Properties

debug: boolean = false

Set to TRUE to allow this camera to render debug data (default FALSE)

depth: number = 0

In case you have more than one camera, the depth value determines which camera is rendered first. The lesser value, the first to render

layers: string[] = ...

Layers to be rendered by this camera. Layers are rendered in ascending order

zoom: number = 1

Camera zoom. Default value is 1