Three. js source code comments (S12) Scenes/FogExp2.js, three. jsfogexp2.js
Wuji (http://blog.csdn.net/omni360)
This article follows the "signature-non-commercial use-consistency" creation public agreement
Reprinted please keep this sentence: Wuji-this blog focuses on Agile development and mobile and IOT device research: data visualization, GOLANG, Html5, WEBGL, THREE. JS. Otherwise, the post from this blog will not be reprinted or reprinted. Thank you for your cooperation.
I also just started learning. Sorry for the errors in many places.
The following code is a comment on the Scenes/FogExp2.js file in the THREE. JS source code file.
More updates in: https://github.com/omni360/three.js.sourcecode
/*** @ Author mrdoob/http://mrdoob.com/* @ author alteredq/http://alteredqualia.com/* // FogExp2 object constructor. it is used to create an index fog Effect in a scenario. The index fog effect is determined by the increasing concentration of the fog Effect Based on the index (density, the functional functions of the Fog object are implemented using a function prototype object constructed. //// usage: var fog = new THREE. fogExp2 (THREE. colorKeywords. cyan, 0.3); // Add exponential fog effect to the scene. The increasing quality of fog effect is 0.3, and the color of fog effect is cyan, * //// <summary> FogExp2 </summary> /// <param name = "color" type = "THREE. color "> the Color attribute of the fog effect. If the fog effect Color is set to black, objects in the distance are rendered to black. </param >/// <Param name = "density" type = "number"> Fog intensity increment index attribute. Optional, the default value is 0.00025 </param> /// <returns type = "FogExp2"> return the new fog effect object </returns> THREE. fogExp2 = function (color, density) {this. name = ''; // The property name of the fog effect object. this is optional. color = new THREE. color (color); // The Color attribute of the fog effect this. density = (density! = Undefined )? Density: 0.00025; // The index attribute of increasing fog intensity. Optional. Default Value: 0.00025 }; /*************************************** * ***** the function provided by the FogExp2 object is shown below. **************************************** // * clone method // clone method to clone a fog object. * //// <summary> clone </summary> /// <returns type = "FogExp2"> returns the cloned exponential fog object. </returns> THREE. fogExp2.prototype. clone = function () {// return new THREE. fogExp2 (this. color. getHex (), this. density); // returns the cloned exponential fog effect object };
Wuji (http://blog.csdn.net/omni360)
This article follows the "signature-non-commercial use-consistency" creation public agreement
Reprinted please keep this sentence: Wuji-this blog focuses on Agile development and mobile and IOT device research: data visualization, GOLANG, Html5, WEBGL, THREE. JS. Otherwise, the post from this blog will not be reprinted or reprinted. Thank you for your cooperation.
The following code is a comment on the Scenes/FogExp2.js file in the THREE. JS source code file.
More updates in: https://github.com/omni360/three.js.sourcecode