Skip to content

Commit ea3762d

Browse files
authored
Fix color attribute initialization of InstancedMesh (mrdoob#22171)
* Fix color attribute initialization in InstancedMesh * Use matrix buffer size instead of storing maxcount
1 parent 30c07bc commit ea3762d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/objects/InstancedMesh.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class InstancedMesh extends Mesh {
9595

9696
if ( this.instanceColor === null ) {
9797

98-
this.instanceColor = new BufferAttribute( new Float32Array( this.count * 3 ), 3 );
98+
this.instanceColor = new BufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ), 3 );
9999

100100
}
101101

0 commit comments

Comments
 (0)