|
@@ -21988,22 +21988,37 @@ window.Modernizr = function(n, e, t) {
|
|
|
return function(t, i, n, r, o, a, s, l) {
|
|
|
if (!t)
|
|
|
throw new M("Player.checkAndWaitForTiledPanoLoad() -> Cannot load texture for null pano.");
|
|
|
+ // 周恩光加 loadTiledPano有时会在progress中卡住,此时判断为成功加载
|
|
|
+ let isDone = false
|
|
|
+ let handle
|
|
|
return e.copy(d.FORWARD),
|
|
|
this.getDirection(e),
|
|
|
- !t.isLoaded(i) && (a && this.model.waitForLoad(t, function() {
|
|
|
- return t.isLoaded(i)
|
|
|
- }),
|
|
|
- t.loadTiledPano(i, e, null, s, l).done(function(e, t) {
|
|
|
- n && n(e, t)
|
|
|
- }
|
|
|
- .bind(this)).fail(function(e) {
|
|
|
- r && r(e)
|
|
|
- }
|
|
|
- .bind(this)).progress(function(e, t, i) {
|
|
|
- o && o(e, t, i)
|
|
|
- }
|
|
|
- .bind(this)),
|
|
|
- !0)
|
|
|
+ !t.isLoaded(i) && (
|
|
|
+ a && this.model.waitForLoad(t, function() {
|
|
|
+ return t.isLoaded(i)
|
|
|
+ }),
|
|
|
+
|
|
|
+ t.loadTiledPano(i, e, null, s, l)
|
|
|
+
|
|
|
+ .done(function(e, t) {
|
|
|
+ isDone = true
|
|
|
+ n && n(e, t)
|
|
|
+ }.bind(this))
|
|
|
+
|
|
|
+ .fail(function(e) {
|
|
|
+ r && r(e)
|
|
|
+ }.bind(this))
|
|
|
+
|
|
|
+ .progress(function(e, t, i) {
|
|
|
+ handle && clearTimeout(handle)
|
|
|
+ handle = setTimeout(() => {
|
|
|
+ if(isDone == false) n && n(e, t)
|
|
|
+ }, 3000) // 卡住3秒判断为加载成功
|
|
|
+ o && o(e, t, i)
|
|
|
+ }.bind(this)),
|
|
|
+
|
|
|
+ !0
|
|
|
+ )
|
|
|
}
|
|
|
}(),
|
|
|
n.prototype.switchCameraMode = function(e, t) {
|