Procházet zdrojové kódy

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

* Add initial value to InstancedMesh's setColorAt method

* add spaces
Zehua Hu před 1 rokem
rodič
revize
f0273bb346
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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 );
 
 		}