mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-17 00:45:55 +10:00
* Removed MeshFaceColorFillMaterial and MeshFaceColorStrokeMaterial * Added MeshFaceMaterial ( it uses the face.material for that pass ) * CanvasRenderer and SVGRenderer per face material logic changed. * SVGRenderer supports particles again. * WebGLRenderer currently broken :/ * Code clean up
29 lines
505 B
JavaScript
29 lines
505 B
JavaScript
/**
|
|
* @author mr.doob / http://mrdoob.com/
|
|
*/
|
|
|
|
THREE.Face4 = function ( a, b, c, d, normal, material ) {
|
|
|
|
this.a = a;
|
|
this.b = b;
|
|
this.c = c;
|
|
this.d = d;
|
|
|
|
this.centroid = new THREE.Vector3();
|
|
this.normal = normal instanceof THREE.Vector3 ? normal : new THREE.Vector3();
|
|
|
|
this.material = material instanceof Array ? material : [ material ];
|
|
|
|
};
|
|
|
|
|
|
THREE.Face4.prototype = {
|
|
|
|
toString: function () {
|
|
|
|
return 'THREE.Face4 ( ' + this.a + ', ' + this.b + ', ' + this.c + ' ' + this.d + ' )';
|
|
|
|
}
|
|
|
|
}
|