浏览代码

making sure material and children are disposed correctly.

Raanan Weber 7 年之前
父节点
当前提交
d4e54468d9
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      Viewer/src/model/viewerModel.ts

+ 1 - 3
Viewer/src/model/viewerModel.ts

@@ -727,8 +727,6 @@ export class ViewerModel implements IDisposable {
         this.skeletons.length = 0;
         this._animations.forEach(ag => ag.dispose());
         this._animations.length = 0;
-        this._meshes.forEach(m => m.dispose());
-        this._meshes.length = 0;
-        this.rootMesh.dispose();
+        this.rootMesh.dispose(false, true);
     }
 }