Scenes allow you to set up what and where is to be rendered by Verge3D. This is where you place objects, lights and cameras.



Create a new scene object.


.autoUpdate : Boolean

Default is true. If set, then the renderer checks every frame if the scene and its objects needs matrix updates. When it isn't, then you have to maintain all matrices in the scene yourself.

.background : Object

If not null, sets the background used when rendering the scene, and is always rendered first. Can be set to a Color which sets the clear color, a Texture covering the canvas, a cubemap as a CubeTexture or WebGLCubeRenderTarget or an equirectangular as a Texture . Default is null.

.environment : Texture

If not null, this texture is set as the environment map for all physical materials in the scene. However, it's not possible to overwrite an existing texture assigned to MeshStandardMaterial.envMap. Default is null.

.fog : Fog

A fog instance defining the type of fog that affects everything rendered in the scene. Default is null.

.overrideMaterial : Material

If not null, it will force everything in the scene to be rendered with that material. Default is null.

.worldEnvMapProbe : CubeReflectionProbe

An instance of a reflection light probe that adds environment IBL to all scene objects.

.worldMaterial : Material

The material used to generate world environment.


.toJSON (meta : Object) : Object

meta -- object containing metadata such as textures or images for the scene.
Convert the scene to Verge3D JSON Object/Scene format.


For more info on how to obtain the source code of this module see this page.