浏览代码

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