Three. js source code comments (forty-one) Light/AmbientLight. js

Source: Internet
Author: User

Three. js source code comments (forty-one) Light/AmbientLight. js

 

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 Light/AmbientLight. JS file in the THREE. js source code file.

 

/*** @ Author mrdoob/http://mrdoob.com/* // The AmbientLight method creates ambient light based on the color attribute of the light. the functions of the AmbientLight object are implemented using a function prototype object constructed by // definition. /// TODO: the shadow of the AmbientLight type has not been implemented in this version .??? /// Example: // var light = new THREE. AmbientLight (0x404040); // scene. add (light );*////AmbientLight///Color Attribute of ambient light ///
 
  
The return value is PointLight.
 THREE. ambientLight = function (color) {THREE. light. call (this, color); // call the call method of the Light object, and hand over the method originally belongs to the Light to the current object AmbientLight for use .}; /*************************************** **************************************** * ********** The following is a function definition provided by the AmbientLight object, some of them inherit from the Light method through prototype ********************************* **************************************** * *************/THREE. ambientLight. prototype = Object. create (THREE. light. prototype); // AmbientLight object from THREE. the Light prototype inherits all the property methods/* clone method // clone method to clone the AmbientLight object *////Clone///
 
  
Returns the cloned AmbientLight object.
 THREE. ambientLight. prototype. clone = function () {var light = new THREE. ambientLight (); THREE. light. prototype. clone. call (this, light); // call THREE. light method, clone the light object return Light; // return the cloned environment light object };
Http://www.bkjia.com/kf/201412/359021.html previous

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.