ProxyFace3.js 903 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. THREE.ProxyFace3 = function ( array, offset, vertexNormals ) {
  5. this.array = array;
  6. this.offset = offset;
  7. this.vertexNormals = vertexNormals;
  8. //THREE.Face3.call( this, array[offset], array[offset+1], array[offset+2] /*, normal, color, materialIndex */);
  9. }
  10. THREE.ProxyFace3.prototype = Object.create( THREE.Face3.prototype );
  11. Object.defineProperties( THREE.ProxyFace3.prototype, {
  12. 'a': {
  13. enumerable: true,
  14. get: function () { return this.array[ this.offset ]; },
  15. set: function ( v ) { this.array[ this.offset ] = v; }
  16. },
  17. 'b': {
  18. enumerable: true,
  19. get: function () { return this.array[ this.offset + 1 ]; },
  20. set: function ( v ) { this.array[ this.offset + 1 ] = v; }
  21. },
  22. 'c': {
  23. enumerable: true,
  24. get: function () { return this.array[ this.offset + 2 ]; },
  25. set: function ( v ) { this.array[ this.offset + 2 ] = v; }
  26. },
  27. } );
粤ICP备19079148号