File: FogExp2.md | Updated: 11/15/2025
This class can be used to define an exponential squared fog, which gives a clear view near the camera and a faster than exponentially densening fog farther from the camera.
const scene = new THREE.Scene();
scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
Constructs a new fog.
color | The fog's color.
---|---
density | Defines how fast the fog will grow dense. Default is 0.00025.
The fog's color.
Defines how fast the fog will grow dense.
Default is 0.00025.
This flag can be used for type testing.
Default is true.
The name of the fog.
Returns a new fog with copied values from this instance.
Returns: A clone of this instance.
Serializes the fog into JSON.
meta | An optional value holding meta information about the serialization.
---|---
Returns: A JSON object representing the serialized fog