API

Class EngineView

Class used to define an additional view for the engine

Index
camera?: Camera | Camera[]

Defines an optional camera or array of cameras used to render the view (will use active camera / cameras else) Support for array of cameras

clearBeforeCopy?: boolean

Indicates if the destination view canvas should be cleared before copying the parent canvas. Can help if the scene clear color has alpha < 1

customResize?: (canvas: HTMLCanvasElement) => void

Defines a custom function to handle canvas size changes. (the canvas to render into is provided to the callback)

enabled: boolean

Indicates if the view is enabled (true by default)

id: string

A randomly generated unique id

target: HTMLCanvasElement

Defines the canvas where to render the view