fireball/lib/core/InstancedInterleavedBuffer.js
2018-12-25 17:29:22 +03:30

34 lines
689 B
JavaScript

import { InterleavedBuffer } from './InterleavedBuffer.js';
/**
* @author benaadams / https://twitter.com/ben_a_adams
*/
function InstancedInterleavedBuffer( array, stride, meshPerAttribute ) {
InterleavedBuffer.call( this, array, stride );
this.meshPerAttribute = meshPerAttribute || 1;
}
InstancedInterleavedBuffer.prototype = Object.assign( Object.create( InterleavedBuffer.prototype ), {
constructor: InstancedInterleavedBuffer,
isInstancedInterleavedBuffer: true,
copy: function ( source ) {
InterleavedBuffer.prototype.copy.call( this, source );
this.meshPerAttribute = source.meshPerAttribute;
return this;
}
} );
export { InstancedInterleavedBuffer };