Three. js source code comments (24) Core/Face4.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 Core/Face4.js file in the THREE. JS source code file.
More updates in: https://github.com/omni360/three.js.sourcecode
/*** @ Author mrdoob/http://mrdoob.com/* // Face3 object constructor. it is used to create a four-dimensional object through parameters a, B, c, d, normal, color, and materialIndex in a four-dimensional space. function functions of Face4 objects are implemented using a function prototype object constructed. ///// NOTE: The Face4 method has been deleted and is replaced by Face3, which is reserved for backward compatibility. //// usage: var a = 0, B = 1, c = 2, d = 3; var normal = new THREE. vector3 (0, 1, 0); var color = new THREE. color (0xffaa00); var face = new THREE. face3 (a, B, c, d, normal, color, 0); // create a four-point color 0xffaa00 composed of a, B, c, d, and normal, A four-corner object with a material index of 0. //// usage: var a = 0, B = 1, c = 2, d = 3; var normal1 = new THREE. vector3 (0, 1, 0), normal2 = new THREE. vector3 (0, 1, 0), normal3 = new THREE. vector3 (0, 1, 0); normal = new Array (normal1, normal2, normal3); var color1 = new THREE. color (0xffaa00), color2 = new THREE. color (0x00aaff), color3 = new THREE. color (0x00ffaa); var color = new Array (color1, color2, color3); var face = new THREE. face3 (a, B, c, d, normal, color, 0); // create a four-point combination of a, B, and c in the color 0xffaa00, 0x00aaff, 0x00ffaa, the normal is directed to a four-corner object with a material index of 0. *////Face4///Index of corner a at four corners ///Index of corner B at four corners ///Index of corner point c in four corners ///Index of d at the corner of the four corners ///Four-corner normal vector, or vertex Normal Vector Array ///Four-corner color value or vertex color value array ///Material Index THREE. face4 = function (a, B, c, d, normal, color, materialIndex) {// prompt that the Face4 method has been deleted and replaced by Face3, which is reserved for backward console compatibility. warn ('Three. face4 has been removed. a three. face3 will be created instead. ') return new THREE. face3 (a, B, c, normal, color, materialIndex); // call Face3 to ignore vertex d and return the created triangle .};
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 Core/Face4.js file in the THREE. JS source code file.
More updates in: https://github.com/omni360/three.js.sourcecode