[name]

This class contains the parameters that define linear fog, i.e., that grows linearly denser with the distance.

Constructor

[name]( [param:Integer color], [param:Float near], [param:Float far] )

The color parameter is passed to the [page:Color] constructor to set the color property. Color can be a hexadecimal integer or a CSS-style string.

Properties

[property:Boolean isFog]

Read-only flag to check if a given object is of type [name].

[property:String name]

Optional name of the object (doesn't need to be unique). Default is an empty string.

[property:Color color]

Fog color. Example: If set to black, far away objects will be rendered black.

[property:Float 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.

Default is 1.

[property:Float 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.

Default is 1000.

Methods

[method:Fog clone]()

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

[method:Object toJSON]()

Return fog data in JSON format.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]