Skip to main content

Object3D

Scene

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

Constructor

Scene

function Scene( ): void;  

Create a new scene object.

Properties

background

background: Object;  

Defines the background of the scene. Default is null. Valid inputs are:

  • A Color for defining a uniform colored background.
  • A Texture for defining a (flat) textured background.
  • Texture cubes (CubeTexture) or equirectangular textures for defining a skybox.

Note: Any camera related configurations like zoom or view are ignored.

backgroundBlurriness

backgroundBlurriness: Float;  

Sets the blurriness of the background. Only influences environment maps assigned to Scene.background. Valid input is a float between 0 and 1. Default is 0.

backgroundIntensity

backgroundIntensity: Float;  

Attenuates the color of the background. Only applies to background textures. Default is 1.

environment

environment: Texture;  

Sets 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: Fog;  

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

isScene

isScene: Boolean;  

Read-only flag to check if a given object is of type Scene.

overrideMaterial

overrideMaterial: Material;  

Forces everything in the scene to be rendered with the defined material. Default is null.

Methods

toJSON

function toJSON( meta: Object ): Object;  

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

Source

src/scenes/Scene.js