Skip to content

Commit

Permalink
ObjectLoader: Use instanceColor.itemSize
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Mar 27, 2021
1 parent a80cccc commit 2f1fa4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loaders/ObjectLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ class ObjectLoader extends Loader {

object = new InstancedMesh( geometry, material, count );
object.instanceMatrix = new BufferAttribute( new Float32Array( instanceMatrix.array ), 16 );
if ( instanceColor !== undefined ) object.instanceColor = new BufferAttribute( new Float32Array( instanceColor.array ), 3 );
if ( instanceColor !== undefined ) object.instanceColor = new BufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize );

break;

Expand Down

0 comments on commit 2f1fa4e

Please sign in to comment.