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

const scene = new THREE.Scene();
scene.fog = new THREE.FogExp2(0xcccccc, 0.002);

See

Implements

Constructors

Properties

Methods

Constructors

  • The color parameter is passed to the Color constructor to set the color property

    Parameters

    Returns FogExp2

    Remarks

    Color can be a hexadecimal integer or a CSS-style string.

Properties

color: Color

Fog color.

Remarks

If set to black, far away objects will be rendered black.

density: number

Defines how fast the fog will grow dense.

Default Value

0.00025

Remarks

Expects a Float

isFogExp2: true

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

Remarks

This is a constant value

Default Value

true

name: string

Optional name of the object

Remarks

(doesn't need to be unique).

Default Value

""

Methods

  • Returns a new FogExp2 instance with the same parameters as this one.

    Returns FogExp2

  • Return FogExp2 data in JSON format.

    Returns any