소스 검색

Merge pull request #21028 from Mugen87/dev44

InstancedMesh: Honor instanceColor in copy().
Mr.doob 4 년 전
부모
커밋
6f98352af0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/objects/InstancedMesh.js

+ 3 - 0
src/objects/InstancedMesh.js

@@ -33,6 +33,9 @@ InstancedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
 		Mesh.prototype.copy.call( this, source );
 
 		this.instanceMatrix.copy( source.instanceMatrix );
+
+		if ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();
+
 		this.count = source.count;
 
 		return this;