Jelajahi Sumber

Fix freeze mechanism

David Catuhe 6 tahun lalu
induk
melakukan
0ad3fc6e94
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      src/scene.ts

+ 8 - 0
src/scene.ts

@@ -3240,6 +3240,14 @@ export class Scene extends AbstractScene implements IAnimatable {
      * @returns the current scene
      */
     public unfreezeActiveMeshes(): Scene {
+
+        for (var index = 0; index < this.meshes.length; index++) {
+            const mesh = this.meshes[index];
+            if (mesh._internalAbstractMeshDataInfo) {
+                mesh._internalAbstractMeshDataInfo._isActive = false;
+            }
+        }
+
         for (var index = 0; index < this._activeMeshes.length; index++) {
             this._activeMeshes.data[index]._unFreeze();
         }