Skip to content
Josh Stovall edited this page Dec 3, 2020 · 1 revision

Fog()

Add fog to the reality. (grows linearly denser with the distance)

new XR.Fog({
    color:0xFFFFFF,
    near: 1,
    far: 1000
});

See the live demo.

Parameters

Name Type Default Description
color color fog color
near float min distace of fog
far float max distance of fog

color

Fog color.

near

The minimum distance to start applying fog. Objects that are less than 'near' units from the active camera won't be affected by fog.

far

The maximum distance at which fog stops being calculated and applied. Objects that are more than 'far' units away from the active camera won't be affected by fog.

Clone this wiki locally