This class contains the parameters that define 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); Copy
const scene = new THREE.Scene();scene.fog = new THREE.FogExp2(0xcccccc, 0.002);
The color parameter is passed to the THREE.Color | Color constructor to set the color property
Optional
Expects a Float
Float
Color can be a hexadecimal integer or a CSS-style string.
Fog color.
If set to black, far away objects will be rendered black.
Defines how fast the fog will grow dense.
0.00025
Readonly
Read-only flag to check if a given object is of type FogExp2.
This is a constant value
true
Optional name of the object
(doesn't need to be unique).
""
Returns a new FogExp2 instance with the same parameters as this one.
Return FogExp2 data in JSON format.
This class contains the parameters that define exponential squared fog, which gives a clear view near the camera and a faster than exponentially densening fog farther from the camera.
Example
See