sebastien 7 lat temu
rodzic
commit
05aeb7bf6a

Plik diff jest za duży
+ 5063 - 5064
Playground/babylon.d.txt


Plik diff jest za duży
+ 9921 - 9922
dist/preview release/babylon.d.ts


Plik diff jest za duży
+ 1 - 1
dist/preview release/babylon.js


+ 8 - 35
dist/preview release/babylon.max.js

@@ -67397,9 +67397,6 @@ var BABYLON;
             catch (e) {
                 // protect error during capability check.
             }
-            if (/iPad|iPhone|iPod/.test(navigator.platform)) {
-                this._unlockiOSaudio();
-            }
         }
         Object.defineProperty(AudioEngine.prototype, "audioContext", {
             /**
@@ -67433,31 +67430,6 @@ var BABYLON;
         AudioEngine.prototype.unlock = function () {
             this._triggerRunningState();
         };
-        AudioEngine.prototype._unlockiOSaudio = function () {
-            var _this = this;
-            this._displayMuteButton(true);
-            var unlockaudio = function () {
-                if (!_this.audioContext) {
-                    return;
-                }
-                var buffer = _this.audioContext.createBuffer(1, 1, 22050);
-                var source = _this.audioContext.createBufferSource();
-                source.buffer = buffer;
-                source.connect(_this.audioContext.destination);
-                source.start(0);
-                setTimeout(function () {
-                    if ((source.playbackState === source.PLAYING_STATE || source.playbackState === source.FINISHED_STATE)) {
-                        _this._triggerRunningState();
-                        if (_this._muteButton) {
-                            _this._muteButton.removeEventListener('touchend', unlockaudio, false);
-                        }
-                    }
-                }, 0);
-            };
-            if (this._muteButton) {
-                this._muteButton.addEventListener('touchend', unlockaudio, false);
-            }
-        };
         AudioEngine.prototype._resumeAudioContext = function () {
             if (this._audioContext.resume) {
                 this._audioContext.resume();
@@ -67511,9 +67483,8 @@ var BABYLON;
             this.onAudioLockedObservable.notifyObservers(this);
             this._displayMuteButton();
         };
-        AudioEngine.prototype._displayMuteButton = function (iOS) {
+        AudioEngine.prototype._displayMuteButton = function () {
             var _this = this;
-            if (iOS === void 0) { iOS = false; }
             if (this.useCustomUnlockedButton) {
                 return;
             }
@@ -67528,11 +67499,12 @@ var BABYLON;
             document.getElementsByTagName('head')[0].appendChild(style);
             document.body.appendChild(this._muteButton);
             this._moveButtonToTopLeft();
-            if (!iOS) {
-                this._muteButton.addEventListener('mousedown', function () {
-                    _this._triggerRunningState();
-                }, false);
-            }
+            this._muteButton.addEventListener('mousedown', function () {
+                _this._triggerRunningState();
+            }, false);
+            this._muteButton.addEventListener('touchend', function () {
+                _this._triggerRunningState();
+            }, false);
             this._muteButtonDisplayed = true;
             window.addEventListener("resize", this._onResize);
         };
@@ -67805,6 +67777,7 @@ var BABYLON;
                                                 }
                                             });
                                             document.body.appendChild(this._htmlAudioElement);
+                                            this._htmlAudioElement.load();
                                         }
                                         break;
                                     }

+ 8 - 35
dist/preview release/babylon.no-module.max.js

@@ -67364,9 +67364,6 @@ var BABYLON;
             catch (e) {
                 // protect error during capability check.
             }
-            if (/iPad|iPhone|iPod/.test(navigator.platform)) {
-                this._unlockiOSaudio();
-            }
         }
         Object.defineProperty(AudioEngine.prototype, "audioContext", {
             /**
@@ -67400,31 +67397,6 @@ var BABYLON;
         AudioEngine.prototype.unlock = function () {
             this._triggerRunningState();
         };
-        AudioEngine.prototype._unlockiOSaudio = function () {
-            var _this = this;
-            this._displayMuteButton(true);
-            var unlockaudio = function () {
-                if (!_this.audioContext) {
-                    return;
-                }
-                var buffer = _this.audioContext.createBuffer(1, 1, 22050);
-                var source = _this.audioContext.createBufferSource();
-                source.buffer = buffer;
-                source.connect(_this.audioContext.destination);
-                source.start(0);
-                setTimeout(function () {
-                    if ((source.playbackState === source.PLAYING_STATE || source.playbackState === source.FINISHED_STATE)) {
-                        _this._triggerRunningState();
-                        if (_this._muteButton) {
-                            _this._muteButton.removeEventListener('touchend', unlockaudio, false);
-                        }
-                    }
-                }, 0);
-            };
-            if (this._muteButton) {
-                this._muteButton.addEventListener('touchend', unlockaudio, false);
-            }
-        };
         AudioEngine.prototype._resumeAudioContext = function () {
             if (this._audioContext.resume) {
                 this._audioContext.resume();
@@ -67478,9 +67450,8 @@ var BABYLON;
             this.onAudioLockedObservable.notifyObservers(this);
             this._displayMuteButton();
         };
-        AudioEngine.prototype._displayMuteButton = function (iOS) {
+        AudioEngine.prototype._displayMuteButton = function () {
             var _this = this;
-            if (iOS === void 0) { iOS = false; }
             if (this.useCustomUnlockedButton) {
                 return;
             }
@@ -67495,11 +67466,12 @@ var BABYLON;
             document.getElementsByTagName('head')[0].appendChild(style);
             document.body.appendChild(this._muteButton);
             this._moveButtonToTopLeft();
-            if (!iOS) {
-                this._muteButton.addEventListener('mousedown', function () {
-                    _this._triggerRunningState();
-                }, false);
-            }
+            this._muteButton.addEventListener('mousedown', function () {
+                _this._triggerRunningState();
+            }, false);
+            this._muteButton.addEventListener('touchend', function () {
+                _this._triggerRunningState();
+            }, false);
             this._muteButtonDisplayed = true;
             window.addEventListener("resize", this._onResize);
         };
@@ -67772,6 +67744,7 @@ var BABYLON;
                                                 }
                                             });
                                             document.body.appendChild(this._htmlAudioElement);
+                                            this._htmlAudioElement.load();
                                         }
                                         break;
                                     }

Plik diff jest za duży
+ 1 - 1
dist/preview release/babylon.worker.js


+ 8 - 35
dist/preview release/es6.js

@@ -67364,9 +67364,6 @@ var BABYLON;
             catch (e) {
                 // protect error during capability check.
             }
-            if (/iPad|iPhone|iPod/.test(navigator.platform)) {
-                this._unlockiOSaudio();
-            }
         }
         Object.defineProperty(AudioEngine.prototype, "audioContext", {
             /**
@@ -67400,31 +67397,6 @@ var BABYLON;
         AudioEngine.prototype.unlock = function () {
             this._triggerRunningState();
         };
-        AudioEngine.prototype._unlockiOSaudio = function () {
-            var _this = this;
-            this._displayMuteButton(true);
-            var unlockaudio = function () {
-                if (!_this.audioContext) {
-                    return;
-                }
-                var buffer = _this.audioContext.createBuffer(1, 1, 22050);
-                var source = _this.audioContext.createBufferSource();
-                source.buffer = buffer;
-                source.connect(_this.audioContext.destination);
-                source.start(0);
-                setTimeout(function () {
-                    if ((source.playbackState === source.PLAYING_STATE || source.playbackState === source.FINISHED_STATE)) {
-                        _this._triggerRunningState();
-                        if (_this._muteButton) {
-                            _this._muteButton.removeEventListener('touchend', unlockaudio, false);
-                        }
-                    }
-                }, 0);
-            };
-            if (this._muteButton) {
-                this._muteButton.addEventListener('touchend', unlockaudio, false);
-            }
-        };
         AudioEngine.prototype._resumeAudioContext = function () {
             if (this._audioContext.resume) {
                 this._audioContext.resume();
@@ -67478,9 +67450,8 @@ var BABYLON;
             this.onAudioLockedObservable.notifyObservers(this);
             this._displayMuteButton();
         };
-        AudioEngine.prototype._displayMuteButton = function (iOS) {
+        AudioEngine.prototype._displayMuteButton = function () {
             var _this = this;
-            if (iOS === void 0) { iOS = false; }
             if (this.useCustomUnlockedButton) {
                 return;
             }
@@ -67495,11 +67466,12 @@ var BABYLON;
             document.getElementsByTagName('head')[0].appendChild(style);
             document.body.appendChild(this._muteButton);
             this._moveButtonToTopLeft();
-            if (!iOS) {
-                this._muteButton.addEventListener('mousedown', function () {
-                    _this._triggerRunningState();
-                }, false);
-            }
+            this._muteButton.addEventListener('mousedown', function () {
+                _this._triggerRunningState();
+            }, false);
+            this._muteButton.addEventListener('touchend', function () {
+                _this._triggerRunningState();
+            }, false);
             this._muteButtonDisplayed = true;
             window.addEventListener("resize", this._onResize);
         };
@@ -67772,6 +67744,7 @@ var BABYLON;
                                                 }
                                             });
                                             document.body.appendChild(this._htmlAudioElement);
+                                            this._htmlAudioElement.load();
                                         }
                                         break;
                                     }

Plik diff jest za duży
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


Plik diff jest za duży
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


Plik diff jest za duży
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


Plik diff jest za duży
+ 3 - 3
dist/preview release/viewer/babylon.viewer.max.js