diff --git a/docs/api/en/scenes/DensityFog.html b/docs/api/en/scenes/DensityFog.html new file mode 100644 index 00000000000000..1d5a5aa232fd11 --- /dev/null +++ b/docs/api/en/scenes/DensityFog.html @@ -0,0 +1,61 @@ + + + + + + + + + +

[name]

+ +

This class contains the parameters that define exponential or exponential squared fog, which gives a clear view near the camera and an exponentially or faster than exponentially densening fog farther from the camera.

+ +

Code Example

+ + const scene = new THREE.Scene(); + scene.fog = new THREE.DensityFog( 0xcccccc, 0.002, true ); + + +

Constructor

+ + +

[name]( [param:Integer color], [param:Float density], [param:bool squared] )

+ +

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 isDensityFog]

+

+ 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 density]

+

Defines how fast the fog will grow dense.

+

Default is 0.00025.

+ +

[property:bool squared]

+

Defines whether the product of density and distance is squared in the exponent.

+

Default is true.

+ +

Methods

+ +

[method:DensityFog clone]()

+

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

+ +

[method:Object toJSON]()

+

Return DensityFog data in JSON format.

+ +

Source

+ +

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

+ + diff --git a/docs/api/en/scenes/Fog.html b/docs/api/en/scenes/Fog.html index aca3beb61d5c68..1132cfb38a2583 100644 --- a/docs/api/en/scenes/Fog.html +++ b/docs/api/en/scenes/Fog.html @@ -9,53 +9,7 @@

[name]

-

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

+

This class is deprecated. Use RangeFog instead.

-

Code Example

- - const scene = new THREE.Scene(); - scene.fog = new THREE.Fog( 0xcccccc, 10, 15 ); - - -

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] -

diff --git a/docs/api/en/scenes/FogExp2.html b/docs/api/en/scenes/FogExp2.html index 8f14e3270fd0bb..55196ba0b7b72a 100644 --- a/docs/api/en/scenes/FogExp2.html +++ b/docs/api/en/scenes/FogExp2.html @@ -9,49 +9,7 @@

[name]

-

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.

+

This class is deprecated. Use DensityFog instead.

-

Code Example

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

Constructor

- - -

[name]( [param:Integer color], [param:Float density] )

- -

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 isFogExp2]

-

- 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 density]

-

Defines how fast the fog will grow dense.

-

Default is 0.00025.

- -

Methods

- -

[method:FogExp2 clone]()

-

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

- -

[method:Object toJSON]()

-

Return FogExp2 data in JSON format.

- -

Source

- -

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

diff --git a/docs/api/en/scenes/RangeFog.html b/docs/api/en/scenes/RangeFog.html new file mode 100644 index 00000000000000..bc0125e1404a70 --- /dev/null +++ b/docs/api/en/scenes/RangeFog.html @@ -0,0 +1,61 @@ + + + + + + + + + +

[name]

+ +

This class contains the parameters that define smooth ranged fog, i.e., that grows smoothly denser from the near to the far distance. The dependence on distance is not linear, but follows a smoothstep curve.

+ +

Code Example

+ + const scene = new THREE.Scene(); + scene.fog = new THREE.RangeFog( 0xcccccc, 10, 15 ); + + +

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 isRangeFog]

+

+ 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:RangeFog clone]()

+

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

+ +

[method:Object toJSON]()

+

Return RangeFog data in JSON format.

+ +

Source

+ +

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

+ + diff --git a/docs/list.json b/docs/list.json index 63a37b65f5e050..3e4a75ed585190 100644 --- a/docs/list.json +++ b/docs/list.json @@ -300,8 +300,8 @@ }, "Scenes": { - "Fog": "api/en/scenes/Fog", - "FogExp2": "api/en/scenes/FogExp2", + "RangeFog": "api/en/scenes/RangeFog", + "DensityFog": "api/en/scenes/DensityFog", "Scene": "api/en/scenes/Scene" },