Преглед изворни кода

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

* Add initial value to InstancedMesh's setColorAt method

* add spaces
Zehua Hu пре 1 година
родитељ
комит
f0273bb346
1 измењених фајлова са 1 додато и 1 уклоњено
  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 );
 
 		}