Browse Source

BabylonLoader now uses config (and the right config values)

Raanan Weber 7 years ago
parent
commit
22946c07df
2 changed files with 19 additions and 14 deletions
  1. 8 7
      Tools/DevLoader/BabylonLoader.js
  2. 11 7
      Tools/Gulp/config.json

+ 8 - 7
Tools/DevLoader/BabylonLoader.js

@@ -141,7 +141,13 @@ var BABYLONDEVTOOLS;
         }
 
         Loader.prototype.loadLibrary = function (library, module) {
-            if (!useDist) {
+            if (library.preventLoadLibrary) {
+                return;
+            }
+
+            if (library.useOutputForDebugging) {
+                this.loadScript(babylonJSPath + '/dist/preview release' + module.build.distOutputDirectory + library.output);
+            } else if (!useDist) {
                 var i = 0;
                 for (; i < library.files.length; i++) {
                     var file = library.files[i];
@@ -239,16 +245,11 @@ var BABYLONDEVTOOLS;
             else {
                 this.loadScript('/dist/preview release/babylon.max.js');
             }
-            this.loadScript('/dist/preview release/gui/babylon.gui.js');
-            this.loadScript('/dist/preview release/inspector/babylon.inspector.bundle.js');
 
             // Modules
             if (loadModules) {
+
                 for (var i = 0; i < settings.modules.length; i++) {
-                    if (settings.modules[i] === "viewer" || settings.modules[i] === "gui" ||
-                        settings.modules[i] === "viewer-assets" || settings.modules[i] === "inspector") {
-                        continue;
-                    }
                     this.loadModule(settings[settings.modules[i]]);
                 }
             }

+ 11 - 7
Tools/Gulp/config.json

@@ -1083,7 +1083,7 @@
             ]
         },
         "textureFormats": {
-            "files": [ ],
+            "files": [],
             "dependUpon": [
                 "dds",
                 "tga",
@@ -1846,10 +1846,11 @@
             {
                 "files": [],
                 "noBundleInName": true,
-                "output": "babylon.gui.js",
+                "output": "babylon.gui.min.js",
                 "webpack": "../../gui/webpack.config.js",
                 "bundle": "true",
-                "babylonIncluded": false
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
             }
         ],
         "build": {
@@ -1880,10 +1881,11 @@
             {
                 "files": [],
                 "sassFiles": [],
-                "output": "babylon.inspector.js",
+                "output": "babylon.inspector.bundle.js",
                 "webpack": "../../inspector/webpack.config.js",
                 "bundle": "true",
-                "extendsRoot": true
+                "extendsRoot": true,
+                "useOutputForDebugging": true
             }
         ],
         "build": {
@@ -1923,7 +1925,8 @@
                     "module": "babylonjs-viewer"
                 },
                 "babylonIncluded": true,
-                "noWatch": true
+                "noWatch": true,
+                "preventLoadLibrary": true
             }
         ],
         "build": {
@@ -1993,7 +1996,8 @@
                     "module": "babylonjs-viewer-assets"
                 },
                 "babylonIncluded": true,
-                "noWatch": true
+                "noWatch": true,
+                "preventLoadLibrary": true
             }
         ],
         "build": {