Face4.js 570 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @author mr.doob / http://mrdoob.com/
  3. */
  4. THREE.Face4 = function ( a, b, c, d, normal, material ) {
  5. this.a = a;
  6. this.b = b;
  7. this.c = c;
  8. this.d = d;
  9. this.centroid = new THREE.Vector3();
  10. this.normal = normal instanceof THREE.Vector3 ? normal : new THREE.Vector3();
  11. this.vertexNormals = normal instanceof Array ? normal : [];
  12. this.material = material instanceof Array ? material : [ material ];
  13. };
  14. THREE.Face4.prototype = {
  15. toString: function () {
  16. return 'THREE.Face4 ( ' + this.a + ', ' + this.b + ', ' + this.c + ' ' + this.d + ' )';
  17. }
  18. }