Sfoglia il codice sorgente

global BABYLON namespace defined

Raanan Weber 7 anni fa
parent
commit
8308d54b0a
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      Tools/Gulp/gulp-babylonModule.js

+ 5 - 1
Tools/Gulp/gulp-babylonModule.js

@@ -71,7 +71,11 @@ if(typeof require !== 'undefined'){
 
         let exportsText = '';
         if (moduleName === "core") {
-            exportsText = `(function() { module.exports = BABYLON; })();
+            exportsText = `(function() {
+    var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this);
+    globalObject["BABYLON"] = BABYLON;
+    module.exports = BABYLON; 
+})();
 }`
         }
         else {