Face4.js 523 B

1234567891011121314151617181920212223242526
  1. var Face4 = Vector3.extend
  2. ({
  3. a: null, b: null, c: null, d: null,
  4. normal: null,
  5. screen: null,
  6. color: null,
  7. init: function(a, b, c, d, uv, normal, color)
  8. {
  9. this._super((a.x + b.x + c.x + d.x) / 4, (a.y + b.y + c.y + d.y) / 4, (a.z + b.z + c.z + d.z) / 4);
  10. this.a = a;
  11. this.b = b;
  12. this.c = c;
  13. this.d = d;
  14. this.screen = new Vector3();
  15. this.color = color ? color : new Color();
  16. },
  17. toString: function()
  18. {
  19. return 'Face4 ( ' + this.a + ', ' + this.b + ', ' + this.c + ', ' + this.d + ' )';
  20. }
  21. });
粤ICP备19079148号