Skip to content

Commit 95a6997

Browse files
mlknzmrdoob
authored andcommitted
instancedBufferGeometry addGroup fix (materialIndex) (mrdoob#9815)
1 parent d68205c commit 95a6997

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/InstancedBufferGeometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ InstancedBufferGeometry.prototype.constructor = InstancedBufferGeometry;
1818

1919
InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;
2020

21-
InstancedBufferGeometry.prototype.addGroup = function ( start, count, instances ) {
21+
InstancedBufferGeometry.prototype.addGroup = function ( start, count, materialIndex ) {
2222

2323
this.groups.push( {
2424

2525
start: start,
2626
count: count,
27-
instances: instances
27+
materialIndex: materialIndex
2828

2929
} );
3030

@@ -54,7 +54,7 @@ InstancedBufferGeometry.prototype.copy = function ( source ) {
5454
for ( var i = 0, l = groups.length; i < l; i ++ ) {
5555

5656
var group = groups[ i ];
57-
this.addGroup( group.start, group.count, group.instances );
57+
this.addGroup( group.start, group.count, group.materialIndex );
5858

5959
}
6060

0 commit comments

Comments
 (0)