Commercial Territory (http://blog.csdn.net/omni360/)
This article follows "Attribution-non-commercial use-consistent" authoring public agreement
Reprint Please keep this sentence: Business Domain-this blog focuses on Agile development and mobile and IoT device research: Data visualization, Golang, HTML5, WEBGL, three. JS, Otherwise, from this blog article refused to reprint or reprint, thank you for your cooperation.
I was just beginning to learn, a lot of things are definitely wrong and please forgive me.
The following code is a comment for the materials/pointcloudmaterial.js file in the three.js source file.
More updates in: Https://github.com/omni360/three.js.sourcecode
/** * @author mrdoob/http://mrdoob.com/* @author alteredq/http://alteredqualia.com/* * parameters = {* Color: < Hex>, * opacity: <float>, * map:new three. Texture (<Image>), * * Size: <FLOAT>, * * blending:three. normalblending, * depthtest: <bool>, * depthwrite: <BOOL>, * * vertexcolors: <BOOL>, * * Fog: <bo The ol> *} *//*///pointcloudmaterial method creates a material type for the point cloud (particle system) based on the parameter parameters, and the format of the///parameters parameter is shown above. The function function of the Pointcloudmaterial object is implemented by defining the function prototype object constructed. Most attribute methods inherit from the base class of the material material.*////<summary>pointcloudmaterial</ Summary>///<param name = "Parameters" type= "String" >string type JSON format material property parameter </param>///<returns type = "Pointcloudmaterial" > Return pointcloudmaterial, point cloud material. </returns>three. pointcloudmaterial = function (parameters) {three. Material.call (this);//Call method of the Material object is called, the method that originally belongs to Material is handed to the current object spritematerial to use This.color = new three. Color (0XFFFFFF); Color, default initialized to 0xFFFFFF, white this.map = null;//normal map map, default to Nullthis.sizE = size of the 1;//point Cloud (particle) point, default initialized to 1.this.sizeattenuation = true;//particle decay, default initialized to True.this.vertexColors = three. nocolors;//vertex color, default initialized to Three.nocolors. Of course there are three. Vertexcolors/three. Facecolors and other options, this shows the flexibility of javascript. This.fog = true;//fog effect, default initialized to true.//todo:pointcloudmaterial why has fog effect attribute, And why is the default initialized to True????????? This.setvalues (parameters);//Call the Setvalues method of the material class to assign the parameter parameters to the properties of the current pointcloudmaterial material.};/ The following is the method property definition for the Pointcloudmaterial object, inherited from the material*** /three. Pointcloudmaterial.prototype = Object.create (three. Material.prototype);/*clone method///clone Method Clone Pointcloudmaterial Object,*////<summary>clone</summary>///< param name = "material" type= "pointcloudmaterial" >pointcloudmaterial object, optional. </param>///<returns type= " Pointcloudmaterial "> returns the cloned Pointcloudmaterial object </returns>three. PointCloudMaterial.prototype.clone = function () {//The following is a copy of the properties of the material. var material = NEW three. Pointcloudmaterial (); Three. Material.prototype.clone.call (this, Material); Material.color.copy (this.color); material.map = This.map; Material.size = This.size;material.sizeattenuation = This.sizeattenuation;material.vertexcolors = this.vertexColors; Material.fog = This.fog;return material;//Returns the cloned Pointcloudmaterial object};//backwards compatibility backwards compatible/*/// The Particlebasicmaterial method is replaced by the Three.pointcloudmaterial method. */three. particlebasicmaterial = function (parameters) {Console.warn (' three. Particlebasicmaterial have been renamed to three. Pointcloudmaterial. '); return new three. pointcloudmaterial (parameters);};/ The *///particlesystemmaterial method is replaced by the Three.pointcloudmaterial method. */three. particlesystemmaterial = function (parameters) {Console.warn (' three. Particlesystemmaterial have been renamed to three. Pointcloudmaterial. '); return new three. pointcloudmaterial (parameters);};
Commercial Territory (http://blog.csdn.net/omni360/)
This article follows "Attribution-non-commercial use-consistent" authoring public agreement
Reprint Please keep this sentence: Business Domain-this blog focuses on Agile development and mobile and IoT device research: Data visualization, Golang, HTML5, WEBGL, three. JS, Otherwise, from this blog article refused to reprint or reprint, thank you for your cooperation.
The following code is a comment for the materials/pointcloudmaterial.js file in the three.js source file.
More updates in: Https://github.com/omni360/three.js.sourcecode
Three.js source Note (56) Material/pointcloudmaterial.js