ソースを参照

Suggested solution to scenes/engines being disposed incorrectly

super.dispose() was nulling the rendering canvas, which prevented scene.detachControl to work.
Raanan Weber 6 年 前
コミット
a9f4c1b53c
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/Engines/engine.ts

+ 2 - 2
src/Engines/engine.ts

@@ -1903,8 +1903,6 @@ export class Engine extends ThinEngine {
     public dispose(): void {
         this.hideLoadingUI();
 
-        super.dispose();
-
         this.onNewSceneAddedObservable.clear();
 
         // Release postProcesses
@@ -1953,6 +1951,8 @@ export class Engine extends ThinEngine {
             document.removeEventListener("webkitpointerlockchange", this._onPointerLockChange);
         }
 
+        super.dispose();
+
         // Remove from Instances
         var index = Engine.Instances.indexOf(this);