Browse Source

Add initial value to InstancedMesh's setColorAt method (#28854)

* Add initial value to InstancedMesh's setColorAt method

* add spaces
Zehua Hu 1 year ago
parent
commit
f0273bb346
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/objects/InstancedMesh.js

+ 1 - 1
src/objects/InstancedMesh.js

@@ -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 );
 
 		}