Explorar o código

global BABYLON namespace defined

Raanan Weber %!s(int64=7) %!d(string=hai) anos
pai
achega
8308d54b0a
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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 {