InstancedBufferAttribute.js 637 B

123456789101112131415161718192021222324
  1. /**
  2. * @author benaadams / https://twitter.com/ben_a_adams
  3. */
  4. THREE.InstancedBufferAttribute = function ( array, itemSize, meshPerAttribute ) {
  5. THREE.BufferAttribute.call( this, array, itemSize );
  6. this.meshPerAttribute = meshPerAttribute || 1;
  7. };
  8. THREE.InstancedBufferAttribute.prototype = Object.create( THREE.BufferAttribute.prototype );
  9. THREE.InstancedBufferAttribute.prototype.constructor = THREE.InstancedBufferAttribute;
  10. THREE.InstancedBufferAttribute.prototype.copy = function ( source ) {
  11. THREE.BufferAttribute.prototype.copy.call( this, source );
  12. this.meshPerAttribute = source.meshPerAttribute;
  13. return this;
  14. };