Inheritance: EventDispatcher → Object3D → Scene →
This class represents a scene with a uniform color that can be used as input for PMREMGenerator#fromScene. The resulting PMREM represents uniform ambient lighting and can be used for Image Based Lighting by assigning it to Scene#environment.
const environment = new ColorEnvironment( 0x00ff00 );
const pmremGenerator = new THREE.PMREMGenerator( renderer );
const envMap = pmremGenerator.fromScene( environment ).texture;
scene.environment = envMap;
ColorEnvironment is an addon, and must be imported explicitly, see Installation#Addons.
import { ColorEnvironment } from 'three/addons/environments/ColorEnvironment.js';
Constructs a new color environment.
color
The color of the environment.
Default is 16777215.
Frees internal resources. This method should be called when the environment is no longer required.