Optional
FPS_Size of the buffer used to calculate FPS, default is 60
Optional
GPUsettingsSettings for GPU.js, default {} (empty object)
Optional
backgroundBackground color of the scene
Optional
bindBind the camera to a GameObject, by default camera is static
Optional
boundsSet the bounds of the scene, by default bounds are not enabled
Optional
clearSet to false to disable clearing the canvas on every tick, default is true
Optional
fpsSet to true to enable an FPS counter in top-left, default is false
Optional
layersLayers in the scene. Will be rendered in the order they are in the array
Optional
lightOptions for lighting, default {} (empty object)
Optional
lightingTrue to enable lighting, default is false
Optional
physicsSet to true to enable physics (Uses matter.js under the hood), default is false. If true and no layers are specified, a default layer will be created with physics enabled. Othewise, physics is handled by each individual layer.
Optional
physicsOptions passed to matter.js engine
Optional
updateFunction to run on every tick, default is an empty function
Generated using TypeDoc
For configuring the properties of a Scene
SceneOptions
Example