瀏覽代碼

Worker feature detection

Raanan Weber 10 年之前
父節點
當前提交
92a4fb7860
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      Babylon/babylon.scene.js
  2. 2 2
      Babylon/babylon.scene.ts

+ 2 - 2
Babylon/babylon.scene.js

@@ -141,8 +141,8 @@ var BABYLON;
             this.mainSoundTrack = new BABYLON.SoundTrack(this, { mainTrack: true });
             //simplification queue
             this.simplificationQueue = new BABYLON.SimplificationQueue();
-            //collision coordinator initialization
-            this.workerCollisions = true;
+            //collision coordinator initialization - if worker not enabled the legacy collision detection will be initialized.
+            this.workerCollisions = !!Worker;
         }
         Object.defineProperty(Scene, "FOGMODE_NONE", {
             get: function () {

+ 2 - 2
Babylon/babylon.scene.ts

@@ -291,8 +291,8 @@
 
             //simplification queue
             this.simplificationQueue = new SimplificationQueue();
-            //collision coordinator initialization
-            this.workerCollisions = true;
+            //collision coordinator initialization - if worker not enabled the legacy collision detection will be initialized.
+            this.workerCollisions = !!Worker;
         }
 
         // Properties