UNPKG

717 BJavaScriptView Raw
1import { BufferGeometry } from './BufferGeometry.js';
2
3/**
4 * @author benaadams / https://twitter.com/ben_a_adams
5 */
6
7function InstancedBufferGeometry() {
8
9 BufferGeometry.call( this );
10
11 this.type = 'InstancedBufferGeometry';
12 this.maxInstancedCount = undefined;
13
14}
15
16InstancedBufferGeometry.prototype = Object.assign( Object.create( BufferGeometry.prototype ), {
17
18 constructor: InstancedBufferGeometry,
19
20 isInstancedBufferGeometry: true,
21
22 copy: function ( source ) {
23
24 BufferGeometry.prototype.copy.call( this, source );
25
26 this.maxInstancedCount = source.maxInstancedCount;
27
28 return this;
29
30 },
31
32 clone: function () {
33
34 return new this.constructor().copy( this );
35
36 }
37
38} );
39
40export { InstancedBufferGeometry };