David Catuhe %!s(int64=8) %!d(string=hai) anos
pai
achega
98116c9c5e

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5887 - 5886
dist/preview release/babylon.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 17 - 17
dist/preview release/babylon.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 27 - 8
dist/preview release/babylon.max.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5889 - 5887
dist/preview release/babylon.module.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 17 - 17
dist/preview release/babylon.worker.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2365 - 2364
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 17 - 17
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 27 - 8
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -16804,9 +16804,6 @@ var BABYLON;
                 this._outlineRenderer = new BABYLON.OutlineRenderer(this);
             }
             this.attachControl();
-            if (BABYLON.SoundTrack) {
-                this.mainSoundTrack = new BABYLON.SoundTrack(this, { mainTrack: true });
-            }
             //simplification queue
             if (BABYLON.SimplificationQueue) {
                 this.simplificationQueue = new BABYLON.SimplificationQueue();
@@ -17108,6 +17105,16 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Scene.prototype, "mainSoundTrack", {
+            get: function () {
+                if (!this._mainSoundTrack) {
+                    // this._mainSoundTrack = new SoundTrack(this, { mainTrack: true });
+                }
+                return this._mainSoundTrack;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(Scene.prototype, "_isAlternateRenderingEnabled", {
             get: function () {
                 return this._alternateRendering;
@@ -19245,7 +19252,7 @@ var BABYLON;
             this._activeParticles.addCount(0, true);
         };
         Scene.prototype._updateAudioParameters = function () {
-            if (!this.audioEnabled || (this.mainSoundTrack.soundCollection.length === 0 && this.soundTracks.length === 1)) {
+            if (!this.audioEnabled || !this._mainSoundTrack || (this._mainSoundTrack.soundCollection.length === 0 && this.soundTracks.length === 1)) {
                 return;
             }
             var listeningCamera;
@@ -19537,6 +19544,9 @@ var BABYLON;
         });
         // Release sounds & sounds tracks
         Scene.prototype.disposeSounds = function () {
+            if (!this._mainSoundTrack) {
+                return;
+            }
             this.mainSoundTrack.dispose();
             for (var scIndex = 0; scIndex < this.soundTracks.length; scIndex++) {
                 this.soundTracks[scIndex].dispose();
@@ -76655,7 +76665,16 @@ var BABYLON;
 })(BABYLON || (BABYLON = {}));
 
 //# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map
-
-if (((typeof window != "undefined" && window.module) || (typeof module != "undefined")) && typeof module.exports != "undefined") {
-    module.exports = BABYLON;
-};
+(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;
+        });
+        

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1938 - 1936
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 3 - 2
dist/preview release/gui/babylon.gui.module.d.ts

@@ -1,3 +1,6 @@
+export = BABYLON.GUI;
+export as namespace BABYLON.GUI;
+
 /// <reference path="../../dist/preview release/babylon.d.ts" />
 declare module BABYLON.GUI {
     interface IFocusableControl {
@@ -672,5 +675,3 @@ declare module BABYLON.GUI {
         static CreateDefaultLayout(): VirtualKeyboard;
     }
 }
-
-export = BABYLON.GUI;

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


+ 14 - 6
src/babylon.scene.ts

@@ -684,11 +684,19 @@
         public _proceduralTextures = new Array<ProceduralTexture>();
 
         // Sound Tracks
-        public mainSoundTrack: SoundTrack;
+        private _mainSoundTrack: SoundTrack;
         public soundTracks = new Array<SoundTrack>();
         private _audioEnabled = true;
         private _headphone = false;
 
+        public get mainSoundTrack(): SoundTrack {
+            if (!this._mainSoundTrack) {
+               // this._mainSoundTrack = new SoundTrack(this, { mainTrack: true });
+            }
+
+            return this._mainSoundTrack;
+        }
+
         // VR Helper
         public VRHelper: VRExperienceHelper;
 
@@ -815,10 +823,6 @@
 
             this.attachControl();
 
-            if (SoundTrack) {
-                this.mainSoundTrack = new SoundTrack(this, { mainTrack: true });
-            }
-
             //simplification queue
             if (SimplificationQueue) {
                 this.simplificationQueue = new SimplificationQueue();
@@ -3305,7 +3309,7 @@
         }
 
         private _updateAudioParameters() {
-            if (!this.audioEnabled || (this.mainSoundTrack.soundCollection.length === 0 && this.soundTracks.length === 1)) {
+            if (!this.audioEnabled || !this._mainSoundTrack || (this._mainSoundTrack.soundCollection.length === 0 && this.soundTracks.length === 1)) {
                 return;
             }
 
@@ -3643,6 +3647,10 @@
 
         // Release sounds & sounds tracks
         public disposeSounds() {
+            if (!this._mainSoundTrack) {
+                return;
+            }
+
             this.mainSoundTrack.dispose();
 
             for (var scIndex = 0; scIndex < this.soundTracks.length; scIndex++) {