ソースを参照

Merge pull request #7374 from Poolminer/master

InstancedMesh parent clone bug fix
David Catuhe 5 年 前
コミット
5decf2abb9
2 ファイル変更2 行追加1 行削除
  1. 1 0
      dist/preview release/what's new.md
  2. 1 1
      src/Meshes/instancedMesh.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -274,6 +274,7 @@
 - It was not possible to change the gaze and laser color in VR ([#7323](https://github.com/BabylonJS/Babylon.js/issues/7323)) ([RaananW](https://github.com/RaananW/))
 - Fixed issue where textures exported using Safari web browser are Y mirrored. ([#7352](https://github.com/BabylonJS/Babylon.js/issues/7352)) ([Drigax](https://github.com/drigax))
 - Fix a bug when resizing a MRT ([Popov72](https://github.com/Popov72))
+- Fixed an infinite clone recursion bug in `InstancedMesh` due to `DeepCopier.DeepCopy` cloning `parent` ([Poolminer](https://github.com/Poolminer/))
 
 ## Breaking changes
 

+ 1 - 1
src/Meshes/instancedMesh.ts

@@ -394,7 +394,7 @@ export class InstancedMesh extends AbstractMesh {
         var result = this._sourceMesh.createInstance(name);
 
         // Deep copy
-        DeepCopier.DeepCopy(this, result, ["name", "subMeshes", "uniqueId"], []);
+        DeepCopier.DeepCopy(this, result, ["name", "subMeshes", "uniqueId", "parent"], []);
 
         // Bounding info
         this.refreshBoundingInfo();