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 extras/geometries/octahedrongeometry.js file in the three.js source file.
More updates in: Https://github.com/omni360/three.js.sourcecode
/** * @author Timothypratley/https://github.com/timothypratley *//*///octahedrongeometry is used to create an eight-faceted object within a three-dimensional space.//////usage : var geometry = new three. Octahedrongeometry////var material = new three. Meshbasicmaterial ({color:0x00ff00});///var icos = new three. Mesh (geometry,material);////Scene.add (ICOS); *////<summary>octahedrongeometry</summary>///<param Name = "radius" type= "float" > Octal body radius </param>///<param name = "detail" type= "int" > Detail factor, default is 0, when more than 0 will have more vertices, The current geometry will not be an octal body, and when the parameter detail is greater than 1, it will become a sphere. </param>three. Octahedrongeometry = function (radius, detail) {this.parameters = {radius:radius,//octal body radius detail:detail//detail factor, default is 0, when more than 0 There will be more vertices, and the current geometry will not be an octal body, and when the parameter detail is greater than 1, it will become a sphere.}; var vertices = [1, 0, 0,-1, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, 1, 0, 0,-1]; Vertex array var indices = [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2];//vertex index th REE. Polyhedrongeometry.call (this, vertices, indices, radius, detail);};/ **The following is a method property definition for the Icosahedrongeometry object, inherited from the Geometry object. ************* /three. Octahedrongeometry.prototype = Object.create (three. Geometry.prototype);
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 extras/geometries/octahedrongeometry.js file in the three.js source file.
More updates in: Https://github.com/omni360/three.js.sourcecode
Three.js source Note (80) extras/geometries/octahedrongeometry.js