Three. js source code comments (S12) Scenes/FogExp2.js, three. jsfogexp2.js

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.