David Catuhe 7 gadi atpakaļ
vecāks
revīzija
8e48d57c9a
25 mainītis faili ar 27831 papildinājumiem un 27669 dzēšanām
  1. 4931 4931
      Playground/babylon.d.txt
  2. 6788 6788
      dist/preview release/babylon.d.ts
  3. 56 56
      dist/preview release/babylon.js
  4. 131 98
      dist/preview release/babylon.max.js
  5. 57 57
      dist/preview release/babylon.worker.js
  6. 15048 15048
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  7. 57 57
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  8. 131 98
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  9. 90 76
      dist/preview release/customConfigurations/minimalGLTFViewer/es6.js
  10. 90 76
      dist/preview release/es6.js
  11. 24 21
      dist/preview release/gui/babylon.gui.js
  12. 4 4
      dist/preview release/gui/babylon.gui.min.js
  13. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  14. 24 21
      dist/preview release/loaders/babylonjs.loaders.js
  15. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  16. 24 21
      dist/preview release/materialsLibrary/babylonjs.materials.js
  17. 2 2
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  18. 24 21
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.js
  19. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  20. 24 21
      dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js
  21. 1 1
      dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js
  22. 24 21
      dist/preview release/serializers/babylonjs.serializers.js
  23. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  24. 64 64
      dist/preview release/viewer/babylon.viewer.js
  25. 228 178
      dist/preview release/viewer/babylon.viewer.max.js

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 4931 - 4931
Playground/babylon.d.txt


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 6788 - 6788
dist/preview release/babylon.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 56 - 56
dist/preview release/babylon.js


+ 131 - 98
dist/preview release/babylon.max.js

@@ -1,32 +1,51 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var CANNON = root. CANNON;
+    if(!CANNON) {
+        if(typeof exports === 'object') {
+             try {  CANNON = require("cannon");  } catch(e) {} 
+        } else if(typeof define === 'function' && define.amd) {
+             if(require.specified && require.specified("cannon")) amdDependencies.push("cannon");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("cannon", [], function () { return CANNON; }); } catch(e) { }
+            }
+            amdDependencies.push("cannon");
+        }
+    }
+
+    var OIMO = root. OIMO;
+    if(!OIMO) {
+        if(typeof exports === 'object') {
+             try {  OIMO = require("oimo");  } catch(e) {} 
+        } else if(typeof define === 'function' && define.amd) {
+             if(require.specified && require.specified("oimo")) amdDependencies.push("oimo");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("oimo", [], function () { return OIMO; }); } catch(e) { }
+            }
+            amdDependencies.push("oimo");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory();
+        module.exports = factory(CANNON,OIMO);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs", [], factory);
+        define("babylonjs", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs"] = factory();
+        exports["babylonjs"] = factory(CANNON,OIMO);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(CANNON,OIMO);
     }
-})(this, function() {
+})(this, function(CANNON,OIMO) {
     "use strict";
 var BABYLON;
 (function (BABYLON) {
@@ -58220,87 +58239,101 @@ var BABYLON;
                 var validParameter = true;
                 // if no parameter is passed, you need to call setAudioBuffer yourself to prepare the sound
                 if (urlOrArrayBuffer) {
-                    if (typeof (urlOrArrayBuffer) === "string")
-                        this._urlType = "String";
-                    if (Array.isArray(urlOrArrayBuffer))
-                        this._urlType = "Array";
-                    if (urlOrArrayBuffer instanceof ArrayBuffer)
-                        this._urlType = "ArrayBuffer";
-                    var urls = [];
-                    var codecSupportedFound = false;
-                    switch (this._urlType) {
-                        case "ArrayBuffer":
-                            if (urlOrArrayBuffer.byteLength > 0) {
-                                codecSupportedFound = true;
-                                this._soundLoaded(urlOrArrayBuffer);
-                            }
-                            break;
-                        case "String":
-                            urls.push(urlOrArrayBuffer);
-                        case "Array":
-                            if (urls.length === 0)
-                                urls = urlOrArrayBuffer;
-                            // If we found a supported format, we load it immediately and stop the loop
-                            for (var i = 0; i < urls.length; i++) {
-                                var url = urls[i];
-                                if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".wav", url.length - 4) !== -1) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf("blob:") !== -1) {
+                    try {
+                        if (typeof (urlOrArrayBuffer) === "string")
+                            this._urlType = "String";
+                        if (Array.isArray(urlOrArrayBuffer))
+                            this._urlType = "Array";
+                        if (urlOrArrayBuffer instanceof ArrayBuffer)
+                            this._urlType = "ArrayBuffer";
+                        var urls = [];
+                        var codecSupportedFound = false;
+                        switch (this._urlType) {
+                            case "ArrayBuffer":
+                                if (urlOrArrayBuffer.byteLength > 0) {
                                     codecSupportedFound = true;
+                                    this._soundLoaded(urlOrArrayBuffer);
                                 }
-                                if (codecSupportedFound) {
-                                    // Loading sound using XHR2
-                                    if (!this._streaming) {
-                                        this._scene._loadFile(url, function (data) { _this._soundLoaded(data); }, undefined, true, true);
+                                break;
+                            case "String":
+                                urls.push(urlOrArrayBuffer);
+                            case "Array":
+                                if (urls.length === 0)
+                                    urls = urlOrArrayBuffer;
+                                // If we found a supported format, we load it immediately and stop the loop
+                                for (var i = 0; i < urls.length; i++) {
+                                    var url = urls[i];
+                                    if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
+                                        codecSupportedFound = true;
                                     }
-                                    else {
-                                        this._htmlAudioElement = new Audio(url);
-                                        this._htmlAudioElement.controls = false;
-                                        this._htmlAudioElement.loop = this.loop;
-                                        BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
-                                        this._htmlAudioElement.preload = "auto";
-                                        this._htmlAudioElement.addEventListener("canplaythrough", function () {
-                                            _this._isReadyToPlay = true;
-                                            if (_this.autoplay) {
-                                                _this.play();
-                                            }
-                                            if (_this._readyToPlayCallback) {
-                                                _this._readyToPlayCallback();
-                                            }
-                                        });
-                                        document.body.appendChild(this._htmlAudioElement);
+                                    if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
+                                        codecSupportedFound = true;
                                     }
-                                    break;
-                                }
-                            }
-                            break;
-                        default:
-                            validParameter = false;
-                            break;
-                    }
-                    if (!validParameter) {
-                        BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
-                    }
-                    else {
-                        if (!codecSupportedFound) {
-                            this._isReadyToPlay = true;
-                            // Simulating a ready to play event to avoid breaking code path
-                            if (this._readyToPlayCallback) {
-                                window.setTimeout(function () {
-                                    if (_this._readyToPlayCallback) {
-                                        _this._readyToPlayCallback();
+                                    if (url.indexOf(".wav", url.length - 4) !== -1) {
+                                        codecSupportedFound = true;
                                     }
-                                }, 1000);
+                                    if (url.indexOf("blob:") !== -1) {
+                                        codecSupportedFound = true;
+                                    }
+                                    if (codecSupportedFound) {
+                                        // Loading sound using XHR2
+                                        if (!this._streaming) {
+                                            this._scene._loadFile(url, function (data) {
+                                                _this._soundLoaded(data);
+                                            }, undefined, true, true, function (exception) {
+                                                if (exception) {
+                                                    BABYLON.Tools.Error("XHR " + exception.status + " error on: " + url + ".");
+                                                }
+                                                BABYLON.Tools.Error("Sound creation aborted.");
+                                                _this._scene.mainSoundTrack.RemoveSound(_this);
+                                            });
+                                        }
+                                        else {
+                                            this._htmlAudioElement = new Audio(url);
+                                            this._htmlAudioElement.controls = false;
+                                            this._htmlAudioElement.loop = this.loop;
+                                            BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
+                                            this._htmlAudioElement.preload = "auto";
+                                            this._htmlAudioElement.addEventListener("canplaythrough", function () {
+                                                _this._isReadyToPlay = true;
+                                                if (_this.autoplay) {
+                                                    _this.play();
+                                                }
+                                                if (_this._readyToPlayCallback) {
+                                                    _this._readyToPlayCallback();
+                                                }
+                                            });
+                                            document.body.appendChild(this._htmlAudioElement);
+                                        }
+                                        break;
+                                    }
+                                }
+                                break;
+                            default:
+                                validParameter = false;
+                                break;
+                        }
+                        if (!validParameter) {
+                            BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
+                        }
+                        else {
+                            if (!codecSupportedFound) {
+                                this._isReadyToPlay = true;
+                                // Simulating a ready to play event to avoid breaking code path
+                                if (this._readyToPlayCallback) {
+                                    window.setTimeout(function () {
+                                        if (_this._readyToPlayCallback) {
+                                            _this._readyToPlayCallback();
+                                        }
+                                    }, 1000);
+                                }
                             }
                         }
                     }
+                    catch (ex) {
+                        BABYLON.Tools.Error("Unexpected error. Sound creation aborted.");
+                        this._scene.mainSoundTrack.RemoveSound(this);
+                    }
                 }
             }
             else {
@@ -58321,7 +58354,7 @@ var BABYLON;
             }
         }
         Sound.prototype.dispose = function () {
-            if (BABYLON.Engine.audioEngine.canUseWebAudio && this._isReadyToPlay) {
+            if (BABYLON.Engine.audioEngine.canUseWebAudio) {
                 if (this.isPlaying) {
                     this.stop();
                 }
@@ -78945,7 +78978,7 @@ var BABYLON;
             this._physicsMaterials = new Array();
             this._fixedTimeStep = 1 / 60;
             //See https://github.com/schteppe/CANNON.js/blob/gh-pages/demos/collisionFilter.html
-            this.BJSCANNON = typeof CANNON !== 'undefined' ? CANNON : (typeof require !== 'undefined' ? require('cannon') : undefined);
+            this.BJSCANNON = CANNON;
             this._minus90X = new BABYLON.Quaternion(-0.7071067811865475, 0, 0, 0.7071067811865475);
             this._plus90X = new BABYLON.Quaternion(0.7071067811865475, 0, 0, 0.7071067811865475);
             this._tmpPosition = BABYLON.Vector3.Zero();
@@ -79500,7 +79533,7 @@ var BABYLON;
             this.name = "OimoJSPlugin";
             this._tmpImpostorsArray = [];
             this._tmpPositionVector = BABYLON.Vector3.Zero();
-            this.BJSOIMO = typeof OIMO !== 'undefined' ? OIMO : (typeof require !== 'undefined' ? require('./Oimo') : undefined);
+            this.BJSOIMO = OIMO;
             this.world = new this.BJSOIMO.World({
                 iterations: iterations
             });

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 57 - 57
dist/preview release/babylon.worker.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 15048 - 15048
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 57 - 57
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 131 - 98
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -1,32 +1,51 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var CANNON = root. CANNON;
+    if(!CANNON) {
+        if(typeof exports === 'object') {
+             try {  CANNON = require("cannon");  } catch(e) {} 
+        } else if(typeof define === 'function' && define.amd) {
+             if(require.specified && require.specified("cannon")) amdDependencies.push("cannon");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("cannon", [], function () { return CANNON; }); } catch(e) { }
+            }
+            amdDependencies.push("cannon");
+        }
+    }
+
+    var OIMO = root. OIMO;
+    if(!OIMO) {
+        if(typeof exports === 'object') {
+             try {  OIMO = require("oimo");  } catch(e) {} 
+        } else if(typeof define === 'function' && define.amd) {
+             if(require.specified && require.specified("oimo")) amdDependencies.push("oimo");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("oimo", [], function () { return OIMO; }); } catch(e) { }
+            }
+            amdDependencies.push("oimo");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory();
+        module.exports = factory(CANNON,OIMO);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs", [], factory);
+        define("babylonjs", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs"] = factory();
+        exports["babylonjs"] = factory(CANNON,OIMO);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(CANNON,OIMO);
     }
-})(this, function() {
+})(this, function(CANNON,OIMO) {
     "use strict";
 var BABYLON;
 (function (BABYLON) {
@@ -57505,87 +57524,101 @@ var BABYLON;
                 var validParameter = true;
                 // if no parameter is passed, you need to call setAudioBuffer yourself to prepare the sound
                 if (urlOrArrayBuffer) {
-                    if (typeof (urlOrArrayBuffer) === "string")
-                        this._urlType = "String";
-                    if (Array.isArray(urlOrArrayBuffer))
-                        this._urlType = "Array";
-                    if (urlOrArrayBuffer instanceof ArrayBuffer)
-                        this._urlType = "ArrayBuffer";
-                    var urls = [];
-                    var codecSupportedFound = false;
-                    switch (this._urlType) {
-                        case "ArrayBuffer":
-                            if (urlOrArrayBuffer.byteLength > 0) {
-                                codecSupportedFound = true;
-                                this._soundLoaded(urlOrArrayBuffer);
-                            }
-                            break;
-                        case "String":
-                            urls.push(urlOrArrayBuffer);
-                        case "Array":
-                            if (urls.length === 0)
-                                urls = urlOrArrayBuffer;
-                            // If we found a supported format, we load it immediately and stop the loop
-                            for (var i = 0; i < urls.length; i++) {
-                                var url = urls[i];
-                                if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".wav", url.length - 4) !== -1) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf("blob:") !== -1) {
+                    try {
+                        if (typeof (urlOrArrayBuffer) === "string")
+                            this._urlType = "String";
+                        if (Array.isArray(urlOrArrayBuffer))
+                            this._urlType = "Array";
+                        if (urlOrArrayBuffer instanceof ArrayBuffer)
+                            this._urlType = "ArrayBuffer";
+                        var urls = [];
+                        var codecSupportedFound = false;
+                        switch (this._urlType) {
+                            case "ArrayBuffer":
+                                if (urlOrArrayBuffer.byteLength > 0) {
                                     codecSupportedFound = true;
+                                    this._soundLoaded(urlOrArrayBuffer);
                                 }
-                                if (codecSupportedFound) {
-                                    // Loading sound using XHR2
-                                    if (!this._streaming) {
-                                        this._scene._loadFile(url, function (data) { _this._soundLoaded(data); }, undefined, true, true);
+                                break;
+                            case "String":
+                                urls.push(urlOrArrayBuffer);
+                            case "Array":
+                                if (urls.length === 0)
+                                    urls = urlOrArrayBuffer;
+                                // If we found a supported format, we load it immediately and stop the loop
+                                for (var i = 0; i < urls.length; i++) {
+                                    var url = urls[i];
+                                    if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
+                                        codecSupportedFound = true;
                                     }
-                                    else {
-                                        this._htmlAudioElement = new Audio(url);
-                                        this._htmlAudioElement.controls = false;
-                                        this._htmlAudioElement.loop = this.loop;
-                                        BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
-                                        this._htmlAudioElement.preload = "auto";
-                                        this._htmlAudioElement.addEventListener("canplaythrough", function () {
-                                            _this._isReadyToPlay = true;
-                                            if (_this.autoplay) {
-                                                _this.play();
-                                            }
-                                            if (_this._readyToPlayCallback) {
-                                                _this._readyToPlayCallback();
-                                            }
-                                        });
-                                        document.body.appendChild(this._htmlAudioElement);
+                                    if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
+                                        codecSupportedFound = true;
                                     }
-                                    break;
-                                }
-                            }
-                            break;
-                        default:
-                            validParameter = false;
-                            break;
-                    }
-                    if (!validParameter) {
-                        BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
-                    }
-                    else {
-                        if (!codecSupportedFound) {
-                            this._isReadyToPlay = true;
-                            // Simulating a ready to play event to avoid breaking code path
-                            if (this._readyToPlayCallback) {
-                                window.setTimeout(function () {
-                                    if (_this._readyToPlayCallback) {
-                                        _this._readyToPlayCallback();
+                                    if (url.indexOf(".wav", url.length - 4) !== -1) {
+                                        codecSupportedFound = true;
                                     }
-                                }, 1000);
+                                    if (url.indexOf("blob:") !== -1) {
+                                        codecSupportedFound = true;
+                                    }
+                                    if (codecSupportedFound) {
+                                        // Loading sound using XHR2
+                                        if (!this._streaming) {
+                                            this._scene._loadFile(url, function (data) {
+                                                _this._soundLoaded(data);
+                                            }, undefined, true, true, function (exception) {
+                                                if (exception) {
+                                                    BABYLON.Tools.Error("XHR " + exception.status + " error on: " + url + ".");
+                                                }
+                                                BABYLON.Tools.Error("Sound creation aborted.");
+                                                _this._scene.mainSoundTrack.RemoveSound(_this);
+                                            });
+                                        }
+                                        else {
+                                            this._htmlAudioElement = new Audio(url);
+                                            this._htmlAudioElement.controls = false;
+                                            this._htmlAudioElement.loop = this.loop;
+                                            BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
+                                            this._htmlAudioElement.preload = "auto";
+                                            this._htmlAudioElement.addEventListener("canplaythrough", function () {
+                                                _this._isReadyToPlay = true;
+                                                if (_this.autoplay) {
+                                                    _this.play();
+                                                }
+                                                if (_this._readyToPlayCallback) {
+                                                    _this._readyToPlayCallback();
+                                                }
+                                            });
+                                            document.body.appendChild(this._htmlAudioElement);
+                                        }
+                                        break;
+                                    }
+                                }
+                                break;
+                            default:
+                                validParameter = false;
+                                break;
+                        }
+                        if (!validParameter) {
+                            BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
+                        }
+                        else {
+                            if (!codecSupportedFound) {
+                                this._isReadyToPlay = true;
+                                // Simulating a ready to play event to avoid breaking code path
+                                if (this._readyToPlayCallback) {
+                                    window.setTimeout(function () {
+                                        if (_this._readyToPlayCallback) {
+                                            _this._readyToPlayCallback();
+                                        }
+                                    }, 1000);
+                                }
                             }
                         }
                     }
+                    catch (ex) {
+                        BABYLON.Tools.Error("Unexpected error. Sound creation aborted.");
+                        this._scene.mainSoundTrack.RemoveSound(this);
+                    }
                 }
             }
             else {
@@ -57606,7 +57639,7 @@ var BABYLON;
             }
         }
         Sound.prototype.dispose = function () {
-            if (BABYLON.Engine.audioEngine.canUseWebAudio && this._isReadyToPlay) {
+            if (BABYLON.Engine.audioEngine.canUseWebAudio) {
                 if (this.isPlaying) {
                     this.stop();
                 }
@@ -78230,7 +78263,7 @@ var BABYLON;
             this._physicsMaterials = new Array();
             this._fixedTimeStep = 1 / 60;
             //See https://github.com/schteppe/CANNON.js/blob/gh-pages/demos/collisionFilter.html
-            this.BJSCANNON = typeof CANNON !== 'undefined' ? CANNON : (typeof require !== 'undefined' ? require('cannon') : undefined);
+            this.BJSCANNON = CANNON;
             this._minus90X = new BABYLON.Quaternion(-0.7071067811865475, 0, 0, 0.7071067811865475);
             this._plus90X = new BABYLON.Quaternion(0.7071067811865475, 0, 0, 0.7071067811865475);
             this._tmpPosition = BABYLON.Vector3.Zero();
@@ -78785,7 +78818,7 @@ var BABYLON;
             this.name = "OimoJSPlugin";
             this._tmpImpostorsArray = [];
             this._tmpPositionVector = BABYLON.Vector3.Zero();
-            this.BJSOIMO = typeof OIMO !== 'undefined' ? OIMO : (typeof require !== 'undefined' ? require('./Oimo') : undefined);
+            this.BJSOIMO = OIMO;
             this.world = new this.BJSOIMO.World({
                 iterations: iterations
             });

+ 90 - 76
dist/preview release/customConfigurations/minimalGLTFViewer/es6.js

@@ -57478,87 +57478,101 @@ var BABYLON;
                 var validParameter = true;
                 // if no parameter is passed, you need to call setAudioBuffer yourself to prepare the sound
                 if (urlOrArrayBuffer) {
-                    if (typeof (urlOrArrayBuffer) === "string")
-                        this._urlType = "String";
-                    if (Array.isArray(urlOrArrayBuffer))
-                        this._urlType = "Array";
-                    if (urlOrArrayBuffer instanceof ArrayBuffer)
-                        this._urlType = "ArrayBuffer";
-                    var urls = [];
-                    var codecSupportedFound = false;
-                    switch (this._urlType) {
-                        case "ArrayBuffer":
-                            if (urlOrArrayBuffer.byteLength > 0) {
-                                codecSupportedFound = true;
-                                this._soundLoaded(urlOrArrayBuffer);
-                            }
-                            break;
-                        case "String":
-                            urls.push(urlOrArrayBuffer);
-                        case "Array":
-                            if (urls.length === 0)
-                                urls = urlOrArrayBuffer;
-                            // If we found a supported format, we load it immediately and stop the loop
-                            for (var i = 0; i < urls.length; i++) {
-                                var url = urls[i];
-                                if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".wav", url.length - 4) !== -1) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf("blob:") !== -1) {
+                    try {
+                        if (typeof (urlOrArrayBuffer) === "string")
+                            this._urlType = "String";
+                        if (Array.isArray(urlOrArrayBuffer))
+                            this._urlType = "Array";
+                        if (urlOrArrayBuffer instanceof ArrayBuffer)
+                            this._urlType = "ArrayBuffer";
+                        var urls = [];
+                        var codecSupportedFound = false;
+                        switch (this._urlType) {
+                            case "ArrayBuffer":
+                                if (urlOrArrayBuffer.byteLength > 0) {
                                     codecSupportedFound = true;
+                                    this._soundLoaded(urlOrArrayBuffer);
                                 }
-                                if (codecSupportedFound) {
-                                    // Loading sound using XHR2
-                                    if (!this._streaming) {
-                                        this._scene._loadFile(url, function (data) { _this._soundLoaded(data); }, undefined, true, true);
+                                break;
+                            case "String":
+                                urls.push(urlOrArrayBuffer);
+                            case "Array":
+                                if (urls.length === 0)
+                                    urls = urlOrArrayBuffer;
+                                // If we found a supported format, we load it immediately and stop the loop
+                                for (var i = 0; i < urls.length; i++) {
+                                    var url = urls[i];
+                                    if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
+                                        codecSupportedFound = true;
                                     }
-                                    else {
-                                        this._htmlAudioElement = new Audio(url);
-                                        this._htmlAudioElement.controls = false;
-                                        this._htmlAudioElement.loop = this.loop;
-                                        BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
-                                        this._htmlAudioElement.preload = "auto";
-                                        this._htmlAudioElement.addEventListener("canplaythrough", function () {
-                                            _this._isReadyToPlay = true;
-                                            if (_this.autoplay) {
-                                                _this.play();
-                                            }
-                                            if (_this._readyToPlayCallback) {
-                                                _this._readyToPlayCallback();
-                                            }
-                                        });
-                                        document.body.appendChild(this._htmlAudioElement);
+                                    if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
+                                        codecSupportedFound = true;
                                     }
-                                    break;
-                                }
-                            }
-                            break;
-                        default:
-                            validParameter = false;
-                            break;
-                    }
-                    if (!validParameter) {
-                        BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
-                    }
-                    else {
-                        if (!codecSupportedFound) {
-                            this._isReadyToPlay = true;
-                            // Simulating a ready to play event to avoid breaking code path
-                            if (this._readyToPlayCallback) {
-                                window.setTimeout(function () {
-                                    if (_this._readyToPlayCallback) {
-                                        _this._readyToPlayCallback();
+                                    if (url.indexOf(".wav", url.length - 4) !== -1) {
+                                        codecSupportedFound = true;
                                     }
-                                }, 1000);
+                                    if (url.indexOf("blob:") !== -1) {
+                                        codecSupportedFound = true;
+                                    }
+                                    if (codecSupportedFound) {
+                                        // Loading sound using XHR2
+                                        if (!this._streaming) {
+                                            this._scene._loadFile(url, function (data) {
+                                                _this._soundLoaded(data);
+                                            }, undefined, true, true, function (exception) {
+                                                if (exception) {
+                                                    BABYLON.Tools.Error("XHR " + exception.status + " error on: " + url + ".");
+                                                }
+                                                BABYLON.Tools.Error("Sound creation aborted.");
+                                                _this._scene.mainSoundTrack.RemoveSound(_this);
+                                            });
+                                        }
+                                        else {
+                                            this._htmlAudioElement = new Audio(url);
+                                            this._htmlAudioElement.controls = false;
+                                            this._htmlAudioElement.loop = this.loop;
+                                            BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
+                                            this._htmlAudioElement.preload = "auto";
+                                            this._htmlAudioElement.addEventListener("canplaythrough", function () {
+                                                _this._isReadyToPlay = true;
+                                                if (_this.autoplay) {
+                                                    _this.play();
+                                                }
+                                                if (_this._readyToPlayCallback) {
+                                                    _this._readyToPlayCallback();
+                                                }
+                                            });
+                                            document.body.appendChild(this._htmlAudioElement);
+                                        }
+                                        break;
+                                    }
+                                }
+                                break;
+                            default:
+                                validParameter = false;
+                                break;
+                        }
+                        if (!validParameter) {
+                            BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
+                        }
+                        else {
+                            if (!codecSupportedFound) {
+                                this._isReadyToPlay = true;
+                                // Simulating a ready to play event to avoid breaking code path
+                                if (this._readyToPlayCallback) {
+                                    window.setTimeout(function () {
+                                        if (_this._readyToPlayCallback) {
+                                            _this._readyToPlayCallback();
+                                        }
+                                    }, 1000);
+                                }
                             }
                         }
                     }
+                    catch (ex) {
+                        BABYLON.Tools.Error("Unexpected error. Sound creation aborted.");
+                        this._scene.mainSoundTrack.RemoveSound(this);
+                    }
                 }
             }
             else {
@@ -57579,7 +57593,7 @@ var BABYLON;
             }
         }
         Sound.prototype.dispose = function () {
-            if (BABYLON.Engine.audioEngine.canUseWebAudio && this._isReadyToPlay) {
+            if (BABYLON.Engine.audioEngine.canUseWebAudio) {
                 if (this.isPlaying) {
                     this.stop();
                 }
@@ -78203,7 +78217,7 @@ var BABYLON;
             this._physicsMaterials = new Array();
             this._fixedTimeStep = 1 / 60;
             //See https://github.com/schteppe/CANNON.js/blob/gh-pages/demos/collisionFilter.html
-            this.BJSCANNON = typeof CANNON !== 'undefined' ? CANNON : (typeof require !== 'undefined' ? require('cannon') : undefined);
+            this.BJSCANNON = CANNON;
             this._minus90X = new BABYLON.Quaternion(-0.7071067811865475, 0, 0, 0.7071067811865475);
             this._plus90X = new BABYLON.Quaternion(0.7071067811865475, 0, 0, 0.7071067811865475);
             this._tmpPosition = BABYLON.Vector3.Zero();
@@ -78758,7 +78772,7 @@ var BABYLON;
             this.name = "OimoJSPlugin";
             this._tmpImpostorsArray = [];
             this._tmpPositionVector = BABYLON.Vector3.Zero();
-            this.BJSOIMO = typeof OIMO !== 'undefined' ? OIMO : (typeof require !== 'undefined' ? require('./Oimo') : undefined);
+            this.BJSOIMO = OIMO;
             this.world = new this.BJSOIMO.World({
                 iterations: iterations
             });

+ 90 - 76
dist/preview release/es6.js

@@ -58193,87 +58193,101 @@ var BABYLON;
                 var validParameter = true;
                 // if no parameter is passed, you need to call setAudioBuffer yourself to prepare the sound
                 if (urlOrArrayBuffer) {
-                    if (typeof (urlOrArrayBuffer) === "string")
-                        this._urlType = "String";
-                    if (Array.isArray(urlOrArrayBuffer))
-                        this._urlType = "Array";
-                    if (urlOrArrayBuffer instanceof ArrayBuffer)
-                        this._urlType = "ArrayBuffer";
-                    var urls = [];
-                    var codecSupportedFound = false;
-                    switch (this._urlType) {
-                        case "ArrayBuffer":
-                            if (urlOrArrayBuffer.byteLength > 0) {
-                                codecSupportedFound = true;
-                                this._soundLoaded(urlOrArrayBuffer);
-                            }
-                            break;
-                        case "String":
-                            urls.push(urlOrArrayBuffer);
-                        case "Array":
-                            if (urls.length === 0)
-                                urls = urlOrArrayBuffer;
-                            // If we found a supported format, we load it immediately and stop the loop
-                            for (var i = 0; i < urls.length; i++) {
-                                var url = urls[i];
-                                if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf(".wav", url.length - 4) !== -1) {
-                                    codecSupportedFound = true;
-                                }
-                                if (url.indexOf("blob:") !== -1) {
+                    try {
+                        if (typeof (urlOrArrayBuffer) === "string")
+                            this._urlType = "String";
+                        if (Array.isArray(urlOrArrayBuffer))
+                            this._urlType = "Array";
+                        if (urlOrArrayBuffer instanceof ArrayBuffer)
+                            this._urlType = "ArrayBuffer";
+                        var urls = [];
+                        var codecSupportedFound = false;
+                        switch (this._urlType) {
+                            case "ArrayBuffer":
+                                if (urlOrArrayBuffer.byteLength > 0) {
                                     codecSupportedFound = true;
+                                    this._soundLoaded(urlOrArrayBuffer);
                                 }
-                                if (codecSupportedFound) {
-                                    // Loading sound using XHR2
-                                    if (!this._streaming) {
-                                        this._scene._loadFile(url, function (data) { _this._soundLoaded(data); }, undefined, true, true);
+                                break;
+                            case "String":
+                                urls.push(urlOrArrayBuffer);
+                            case "Array":
+                                if (urls.length === 0)
+                                    urls = urlOrArrayBuffer;
+                                // If we found a supported format, we load it immediately and stop the loop
+                                for (var i = 0; i < urls.length; i++) {
+                                    var url = urls[i];
+                                    if (url.indexOf(".mp3", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isMP3supported) {
+                                        codecSupportedFound = true;
                                     }
-                                    else {
-                                        this._htmlAudioElement = new Audio(url);
-                                        this._htmlAudioElement.controls = false;
-                                        this._htmlAudioElement.loop = this.loop;
-                                        BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
-                                        this._htmlAudioElement.preload = "auto";
-                                        this._htmlAudioElement.addEventListener("canplaythrough", function () {
-                                            _this._isReadyToPlay = true;
-                                            if (_this.autoplay) {
-                                                _this.play();
-                                            }
-                                            if (_this._readyToPlayCallback) {
-                                                _this._readyToPlayCallback();
-                                            }
-                                        });
-                                        document.body.appendChild(this._htmlAudioElement);
+                                    if (url.indexOf(".ogg", url.length - 4) !== -1 && BABYLON.Engine.audioEngine.isOGGsupported) {
+                                        codecSupportedFound = true;
                                     }
-                                    break;
-                                }
-                            }
-                            break;
-                        default:
-                            validParameter = false;
-                            break;
-                    }
-                    if (!validParameter) {
-                        BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
-                    }
-                    else {
-                        if (!codecSupportedFound) {
-                            this._isReadyToPlay = true;
-                            // Simulating a ready to play event to avoid breaking code path
-                            if (this._readyToPlayCallback) {
-                                window.setTimeout(function () {
-                                    if (_this._readyToPlayCallback) {
-                                        _this._readyToPlayCallback();
+                                    if (url.indexOf(".wav", url.length - 4) !== -1) {
+                                        codecSupportedFound = true;
                                     }
-                                }, 1000);
+                                    if (url.indexOf("blob:") !== -1) {
+                                        codecSupportedFound = true;
+                                    }
+                                    if (codecSupportedFound) {
+                                        // Loading sound using XHR2
+                                        if (!this._streaming) {
+                                            this._scene._loadFile(url, function (data) {
+                                                _this._soundLoaded(data);
+                                            }, undefined, true, true, function (exception) {
+                                                if (exception) {
+                                                    BABYLON.Tools.Error("XHR " + exception.status + " error on: " + url + ".");
+                                                }
+                                                BABYLON.Tools.Error("Sound creation aborted.");
+                                                _this._scene.mainSoundTrack.RemoveSound(_this);
+                                            });
+                                        }
+                                        else {
+                                            this._htmlAudioElement = new Audio(url);
+                                            this._htmlAudioElement.controls = false;
+                                            this._htmlAudioElement.loop = this.loop;
+                                            BABYLON.Tools.SetCorsBehavior(url, this._htmlAudioElement);
+                                            this._htmlAudioElement.preload = "auto";
+                                            this._htmlAudioElement.addEventListener("canplaythrough", function () {
+                                                _this._isReadyToPlay = true;
+                                                if (_this.autoplay) {
+                                                    _this.play();
+                                                }
+                                                if (_this._readyToPlayCallback) {
+                                                    _this._readyToPlayCallback();
+                                                }
+                                            });
+                                            document.body.appendChild(this._htmlAudioElement);
+                                        }
+                                        break;
+                                    }
+                                }
+                                break;
+                            default:
+                                validParameter = false;
+                                break;
+                        }
+                        if (!validParameter) {
+                            BABYLON.Tools.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.");
+                        }
+                        else {
+                            if (!codecSupportedFound) {
+                                this._isReadyToPlay = true;
+                                // Simulating a ready to play event to avoid breaking code path
+                                if (this._readyToPlayCallback) {
+                                    window.setTimeout(function () {
+                                        if (_this._readyToPlayCallback) {
+                                            _this._readyToPlayCallback();
+                                        }
+                                    }, 1000);
+                                }
                             }
                         }
                     }
+                    catch (ex) {
+                        BABYLON.Tools.Error("Unexpected error. Sound creation aborted.");
+                        this._scene.mainSoundTrack.RemoveSound(this);
+                    }
                 }
             }
             else {
@@ -58294,7 +58308,7 @@ var BABYLON;
             }
         }
         Sound.prototype.dispose = function () {
-            if (BABYLON.Engine.audioEngine.canUseWebAudio && this._isReadyToPlay) {
+            if (BABYLON.Engine.audioEngine.canUseWebAudio) {
                 if (this.isPlaying) {
                     this.stop();
                 }
@@ -78918,7 +78932,7 @@ var BABYLON;
             this._physicsMaterials = new Array();
             this._fixedTimeStep = 1 / 60;
             //See https://github.com/schteppe/CANNON.js/blob/gh-pages/demos/collisionFilter.html
-            this.BJSCANNON = typeof CANNON !== 'undefined' ? CANNON : (typeof require !== 'undefined' ? require('cannon') : undefined);
+            this.BJSCANNON = CANNON;
             this._minus90X = new BABYLON.Quaternion(-0.7071067811865475, 0, 0, 0.7071067811865475);
             this._plus90X = new BABYLON.Quaternion(0.7071067811865475, 0, 0, 0.7071067811865475);
             this._tmpPosition = BABYLON.Vector3.Zero();
@@ -79473,7 +79487,7 @@ var BABYLON;
             this.name = "OimoJSPlugin";
             this._tmpImpostorsArray = [];
             this._tmpPositionVector = BABYLON.Vector3.Zero();
-            this.BJSOIMO = typeof OIMO !== 'undefined' ? OIMO : (typeof require !== 'undefined' ? require('./Oimo') : undefined);
+            this.BJSOIMO = OIMO;
             this.world = new this.BJSOIMO.World({
                 iterations: iterations
             });

+ 24 - 21
dist/preview release/gui/babylon.gui.js

@@ -1,30 +1,33 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var BABYLON = root. BABYLON;
+    if(!BABYLON) {
+        if(typeof exports === 'object') {
+             BABYLON = require("babylonjs"); 
+        } else if(typeof define === 'function' && define.amd) {
+             amdDependencies.push("babylonjs");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("babylonjs", [], function () { return BABYLON; }); } catch(e) { }
+            }
+            amdDependencies.push("babylonjs");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory(require("babylonjs"));
+        module.exports = factory(BABYLON);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs-gui", ["babylonjs"], factory);
+        define("babylonjs-gui", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs-gui"] = factory(require("babylonjs"));
+        exports["babylonjs-gui"] = factory(BABYLON);
     else {
-        root["BABYLON"]["GUI"] = factory(root["BABYLON"]);
+        root["BABYLON"]["GUI"] = factory(BABYLON);
     }
 })(this, function(BABYLON) {
     "use strict";

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 4 - 4
dist/preview release/gui/babylon.gui.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


+ 24 - 21
dist/preview release/loaders/babylonjs.loaders.js

@@ -1,30 +1,33 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var BABYLON = root. BABYLON;
+    if(!BABYLON) {
+        if(typeof exports === 'object') {
+             BABYLON = require("babylonjs"); 
+        } else if(typeof define === 'function' && define.amd) {
+             amdDependencies.push("babylonjs");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("babylonjs", [], function () { return BABYLON; }); } catch(e) { }
+            }
+            amdDependencies.push("babylonjs");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory(require("babylonjs"));
+        module.exports = factory(BABYLON);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs-loaders", ["babylonjs"], factory);
+        define("babylonjs-loaders", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs-loaders"] = factory(require("babylonjs"));
+        exports["babylonjs-loaders"] = factory(BABYLON);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(BABYLON);
     }
 })(this, function(BABYLON) {
     "use strict";

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


+ 24 - 21
dist/preview release/materialsLibrary/babylonjs.materials.js

@@ -1,30 +1,33 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var BABYLON = root. BABYLON;
+    if(!BABYLON) {
+        if(typeof exports === 'object') {
+             BABYLON = require("babylonjs"); 
+        } else if(typeof define === 'function' && define.amd) {
+             amdDependencies.push("babylonjs");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("babylonjs", [], function () { return BABYLON; }); } catch(e) { }
+            }
+            amdDependencies.push("babylonjs");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory(require("babylonjs"));
+        module.exports = factory(BABYLON);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs-materials", ["babylonjs"], factory);
+        define("babylonjs-materials", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs-materials"] = factory(require("babylonjs"));
+        exports["babylonjs-materials"] = factory(BABYLON);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(BABYLON);
     }
 })(this, function(BABYLON) {
     "use strict";

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 2
dist/preview release/materialsLibrary/babylonjs.materials.min.js


+ 24 - 21
dist/preview release/postProcessesLibrary/babylonjs.postProcess.js

@@ -1,30 +1,33 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var BABYLON = root. BABYLON;
+    if(!BABYLON) {
+        if(typeof exports === 'object') {
+             BABYLON = require("babylonjs"); 
+        } else if(typeof define === 'function' && define.amd) {
+             amdDependencies.push("babylonjs");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("babylonjs", [], function () { return BABYLON; }); } catch(e) { }
+            }
+            amdDependencies.push("babylonjs");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory(require("babylonjs"));
+        module.exports = factory(BABYLON);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs-post-process", ["babylonjs"], factory);
+        define("babylonjs-post-process", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs-post-process"] = factory(require("babylonjs"));
+        exports["babylonjs-post-process"] = factory(BABYLON);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(BABYLON);
     }
 })(this, function(BABYLON) {
     "use strict";

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


+ 24 - 21
dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js

@@ -1,30 +1,33 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var BABYLON = root. BABYLON;
+    if(!BABYLON) {
+        if(typeof exports === 'object') {
+             BABYLON = require("babylonjs"); 
+        } else if(typeof define === 'function' && define.amd) {
+             amdDependencies.push("babylonjs");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("babylonjs", [], function () { return BABYLON; }); } catch(e) { }
+            }
+            amdDependencies.push("babylonjs");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory(require("babylonjs"));
+        module.exports = factory(BABYLON);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs-procedural-textures", ["babylonjs"], factory);
+        define("babylonjs-procedural-textures", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs-procedural-textures"] = factory(require("babylonjs"));
+        exports["babylonjs-procedural-textures"] = factory(BABYLON);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(BABYLON);
     }
 })(this, function(BABYLON) {
     "use strict";

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js


+ 24 - 21
dist/preview release/serializers/babylonjs.serializers.js

@@ -1,30 +1,33 @@
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-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;
-return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-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]; };
-            return function (d, b) {
-                extendStatics(d, b);
-                function __() { this.constructor = d; }
-                d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-            };
-        })();
-        
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
+
 
 (function universalModuleDefinition(root, factory) {
+    var amdDependencies = [];
+    var BABYLON = root. BABYLON;
+    if(!BABYLON) {
+        if(typeof exports === 'object') {
+             BABYLON = require("babylonjs"); 
+        } else if(typeof define === 'function' && define.amd) {
+             amdDependencies.push("babylonjs");
+        }
+    } else {
+        if(typeof define === 'function' && define.amd) {
+            if(!(require.specified && require.specified("' + dep.module + '"))) {
+                try { define("babylonjs", [], function () { return BABYLON; }); } catch(e) { }
+            }
+            amdDependencies.push("babylonjs");
+        }
+    }
+
     if(typeof exports === 'object' && typeof module === 'object')
-        module.exports = factory(require("babylonjs"));
+        module.exports = factory(BABYLON);
     else if(typeof define === 'function' && define.amd)
-        define("babylonjs-serializers", ["babylonjs"], factory);
+        define("babylonjs-serializers", amdDependencies, factory);
     else if(typeof exports === 'object')
-        exports["babylonjs-serializers"] = factory(require("babylonjs"));
+        exports["babylonjs-serializers"] = factory(BABYLON);
     else {
-        root["BABYLON"] = factory(root["BABYLON"]);
+        root["BABYLON"] = factory(BABYLON);
     }
 })(this, function(BABYLON) {
     "use strict";

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 64 - 64
dist/preview release/viewer/babylon.viewer.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 228 - 178
dist/preview release/viewer/babylon.viewer.max.js