Skip to content

Commit

Permalink
Add initial value to InstancedMesh's setColorAt method (#28854)
Browse files Browse the repository at this point in the history
* Add initial value to InstancedMesh's setColorAt method

* add spaces
  • Loading branch information
zehuahu committed Jul 13, 2024
1 parent 5481dd5 commit f0273bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objects/InstancedMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class InstancedMesh extends Mesh {

if ( this.instanceColor === null ) {

this.instanceColor = new InstancedBufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ), 3 );
this.instanceColor = new InstancedBufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ).fill( 1 ), 3 );

}

Expand Down

0 comments on commit f0273bb

Please sign in to comment.