Three.js source Note (80) extras/geometries/octahedrongeometry.js

Source: Internet
Author: User

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

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.