Ver código fonte

Merge pull request #3118 from RaananW/npm-beta1.1

inspector, webpack, npm, and a lot of fun!
Raanan Weber 7 anos atrás
pai
commit
c148cc1355

Diferenças do arquivo suprimidas por serem muito extensas
+ 991 - 990
dist/preview release/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 46 - 46
dist/preview release/babylon.js


+ 4 - 3
dist/preview release/babylon.max.js

@@ -68863,9 +68863,9 @@ var BABYLON;
     // load the inspector using require, if not present in the global namespace.
     var DebugLayer = /** @class */ (function () {
         function DebugLayer(scene) {
+            this.BJSINSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
             this._scene = scene;
             // load inspector using require, if it doesn't exist on the global namespace.
-            INSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : (typeof require !== 'undefined' ? require('INSPECTOR') : undefined);
         }
         /** Creates the inspector window. */
         DebugLayer.prototype._createInspector = function (config) {
@@ -68874,7 +68874,8 @@ var BABYLON;
             var initialTab = config.initialTab || 0;
             var parentElement = config.parentElement || null;
             if (!this._inspector) {
-                this._inspector = new INSPECTOR.Inspector(this._scene, popup, initialTab, parentElement, config.newColors);
+                this.BJSINSPECTOR = this.BJSINSPECTOR || typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+                this._inspector = new this.BJSINSPECTOR.Inspector(this._scene, popup, initialTab, parentElement, config.newColors);
             } // else nothing to do,; instance is already existing
         };
         DebugLayer.prototype.isVisible = function () {
@@ -68896,7 +68897,7 @@ var BABYLON;
         };
         DebugLayer.prototype.show = function (config) {
             if (config === void 0) { config = {}; }
-            if (typeof INSPECTOR == 'undefined') {
+            if (typeof this.BJSINSPECTOR == 'undefined') {
                 // Load inspector and add it to the DOM
                 BABYLON.Tools.LoadScript(DebugLayer.InspectorURL, this._createInspector.bind(this, config));
             }

Diferenças do arquivo suprimidas por serem muito extensas
+ 991 - 990
dist/preview release/babylon.module.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 47 - 47
dist/preview release/babylon.worker.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 49 - 49
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 4 - 3
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -68709,9 +68709,9 @@ var BABYLON;
     // load the inspector using require, if not present in the global namespace.
     var DebugLayer = /** @class */ (function () {
         function DebugLayer(scene) {
+            this.BJSINSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
             this._scene = scene;
             // load inspector using require, if it doesn't exist on the global namespace.
-            INSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : (typeof require !== 'undefined' ? require('INSPECTOR') : undefined);
         }
         /** Creates the inspector window. */
         DebugLayer.prototype._createInspector = function (config) {
@@ -68720,7 +68720,8 @@ var BABYLON;
             var initialTab = config.initialTab || 0;
             var parentElement = config.parentElement || null;
             if (!this._inspector) {
-                this._inspector = new INSPECTOR.Inspector(this._scene, popup, initialTab, parentElement, config.newColors);
+                this.BJSINSPECTOR = this.BJSINSPECTOR || typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+                this._inspector = new this.BJSINSPECTOR.Inspector(this._scene, popup, initialTab, parentElement, config.newColors);
             } // else nothing to do,; instance is already existing
         };
         DebugLayer.prototype.isVisible = function () {
@@ -68742,7 +68743,7 @@ var BABYLON;
         };
         DebugLayer.prototype.show = function (config) {
             if (config === void 0) { config = {}; }
-            if (typeof INSPECTOR == 'undefined') {
+            if (typeof this.BJSINSPECTOR == 'undefined') {
                 // Load inspector and add it to the DOM
                 BABYLON.Tools.LoadScript(DebugLayer.InspectorURL, this._createInspector.bind(this, config));
             }

Diferenças do arquivo suprimidas por serem muito extensas
+ 6447 - 6446
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 3 - 3
dist/preview release/inspector/package.json

@@ -4,14 +4,14 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "3.1.0-beta1.1",
+    "version": "3.1.0-beta1.1.1",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
     },
-    "main": "babylonjs.inspector.bundle.js",
+    "main": "babylon.inspector.bundle.js",
     "files": [
-        "babylonjs.inspector.bundle.js",
+        "babylon.inspector.bundle.js",
         "readme.md",
         "package.json"
     ],

+ 1 - 1
package.json

@@ -8,7 +8,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.1.0-beta1.1",
+    "version": "3.1.0-beta1.1.1",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 7 - 4
src/Debug/babylon.debugLayer.ts

@@ -1,7 +1,6 @@
 module BABYLON {
 
     // declare INSPECTOR namespace for compilation issue
-    declare var require: any;
     declare var INSPECTOR: any;
     // load the inspector using require, if not present in the global namespace.
 
@@ -11,10 +10,12 @@ module BABYLON {
         // The inspector instance
         private _inspector: any;
 
+        private BJSINSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+
         constructor(scene: Scene) {
             this._scene = scene;
             // load inspector using require, if it doesn't exist on the global namespace.
-            INSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : (typeof require !== 'undefined' ? require('INSPECTOR') : undefined);
+
         }
 
         /** Creates the inspector window. */
@@ -36,7 +37,9 @@ module BABYLON {
             let initialTab = config.initialTab || 0;
             let parentElement = config.parentElement || null;
             if (!this._inspector) {
-                this._inspector = new INSPECTOR.Inspector(this._scene, popup, initialTab, parentElement, config.newColors);
+                this.BJSINSPECTOR = this.BJSINSPECTOR || typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+
+                this._inspector = new this.BJSINSPECTOR.Inspector(this._scene, popup, initialTab, parentElement, config.newColors);
             } // else nothing to do,; instance is already existing
         }
 
@@ -72,7 +75,7 @@ module BABYLON {
                 colorBot?: string
             }
         } = {}) {
-            if (typeof INSPECTOR == 'undefined') {
+            if (typeof this.BJSINSPECTOR == 'undefined') {
                 // Load inspector and add it to the DOM
                 Tools.LoadScript(DebugLayer.InspectorURL, this._createInspector.bind(this, config));
             } else {