Kaynağa Gözat

Revert module update

David Catuhe 8 yıl önce
ebeveyn
işleme
0e55672453

+ 7 - 17
Tools/Gulp/gulp-addModuleExports.js

@@ -4,22 +4,13 @@ var through = require('through2');
 module.exports = function (varName) {
     return through.obj(function (file, enc, cb) {
 
-        var moduleExportsAddition = `(function universalModuleDefinition(root, factory) {
-            if(typeof exports === 'object' && typeof module === 'object')
-                module.exports = factory();
-            else if(typeof define === 'function' && define.amd)
-                define([], factory);
-            else if(typeof exports === 'object')
-                exports["BABYLON"] = factory();
-            else
-                root["BABYLON"] = factory();
-        })(this, function() {
-            return BABYLON;
-        });
-        `;
+        var moduleExportsAddition =
+          '\nif (((typeof window != "undefined" && window.module) || (typeof module != "undefined")) && typeof module.exports != "undefined") {\n' +
+          '    module.exports = ' + varName + ';\n' +
+          '};\n';
 
         var extendsAddition =
-            `var __extends = (this && this.__extends) || (function () {
+        `var __extends = (this && this.__extends) || (function () {
             var extendStatics = Object.setPrototypeOf ||
                 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
                 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
@@ -32,12 +23,12 @@ module.exports = function (varName) {
         `;
 
         var decorateAddition =
-            'var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n' +
+        'var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n' +
             'var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n' +
             'if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);\n' +
             'else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n' +
             'return c > 3 && r && Object.defineProperty(target, key, r), r;\n' +
-            '};\n';
+        '};\n';
 
         if (file.isNull()) {
             cb(null, file);
@@ -59,4 +50,3 @@ module.exports = function (varName) {
         cb();
     });
 };
-

Dosya farkı çok büyük olduğundan ihmal edildi
+ 734 - 734
dist/preview release/babylon.d.ts


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/preview release/babylon.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 4 - 13
dist/preview release/babylon.max.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 734 - 734
dist/preview release/babylon.module.d.ts


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/preview release/babylon.worker.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1767 - 1767
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


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

@@ -76665,16 +76665,7 @@ var BABYLON;
 })(BABYLON || (BABYLON = {}));
 
 //# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map
-(function universalModuleDefinition(root, factory) {
-            if(typeof exports === 'object' && typeof module === 'object')
-                module.exports = factory();
-            else if(typeof define === 'function' && define.amd)
-                define([], factory);
-            else if(typeof exports === 'object')
-                exports["BABYLON"] = factory();
-            else
-                root["BABYLON"] = factory();
-        })(this, function() {
-            return BABYLON;
-        });
-        
+
+if (((typeof window != "undefined" && window.module) || (typeof module != "undefined")) && typeof module.exports != "undefined") {
+    module.exports = BABYLON;
+};

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1767 - 1767
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts