InstancedInterleavedBuffer.js 689 B

123456789101112131415161718192021222324252627282930313233
  1. import { InterleavedBuffer } from './InterleavedBuffer.js';
  2. /**
  3. * @author benaadams / https://twitter.com/ben_a_adams
  4. */
  5. function InstancedInterleavedBuffer( array, stride, meshPerAttribute ) {
  6. InterleavedBuffer.call( this, array, stride );
  7. this.meshPerAttribute = meshPerAttribute || 1;
  8. }
  9. InstancedInterleavedBuffer.prototype = Object.assign( Object.create( InterleavedBuffer.prototype ), {
  10. constructor: InstancedInterleavedBuffer,
  11. isInstancedInterleavedBuffer: true,
  12. copy: function ( source ) {
  13. InterleavedBuffer.prototype.copy.call( this, source );
  14. this.meshPerAttribute = source.meshPerAttribute;
  15. return this;
  16. }
  17. } );
  18. export { InstancedInterleavedBuffer };