|
@@ -22385,23 +22385,38 @@ window.Modernizr = function(n, e, t) {
|
|
|
//loadVideo();//add
|
|
|
//-------------------
|
|
|
|
|
|
- /* setTimeout(()=>{
|
|
|
- this.qualityManager.updateMaximums()
|
|
|
- window.stats && (stats.dom.parentElement && stats.dom.parentElement.removeChild(stats.dom), window.stats = null)
|
|
|
- },6000) */
|
|
|
-
|
|
|
+ //根据帧率调整加载分辨率
|
|
|
var updateCount = 0;
|
|
|
- var interval = setInterval(()=>{
|
|
|
- updateCount ++
|
|
|
- if(updateCount>4){
|
|
|
- clearInterval(interval)
|
|
|
- window.stats && (stats.dom.parentElement && stats.dom.parentElement.removeChild(stats.dom), window.stats = null)
|
|
|
- return;
|
|
|
- }
|
|
|
- this.qualityManager.updateMaximums()
|
|
|
- },5000)
|
|
|
|
|
|
+ window.stats.addInterval(
|
|
|
+ ()=>{
|
|
|
+ updateCount ++
|
|
|
+
|
|
|
+ var oldMaxZoom = this.qualityManager.getMaxZoomPanoSize()
|
|
|
+ this.qualityManager.updateMaximums()
|
|
|
+ /* var nowMaxZoom = this.qualityManager.getMaxZoomPanoSize()
|
|
|
+
|
|
|
+ if(nowMaxZoom > oldMaxZoom && this.mode == 'panorama' && this.currentPano.zoomed){
|
|
|
+ this.panoRenderer.resetRenderStatus(this.currentPano.id, !1, !0, oldMaxZoom );
|
|
|
+ this.panoRenderer.clearAllQueuedUploadsForPano(this.currentPano.id);
|
|
|
+ this.panoRenderer.renderPanoTiles(this.currentPano.id, null, !1, !1);
|
|
|
+ } */
|
|
|
+ console.log("updateCount "+updateCount)
|
|
|
+ if(updateCount>5){
|
|
|
+
|
|
|
+ window.stats && (stats.dom.parentElement && stats.dom.parentElement.removeChild(stats.dom), window.stats.dispose(), window.stats = null)
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return true
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ )
|
|
|
+
|
|
|
|
|
|
var t = e.mode
|
|
|
, i = e.pano
|
|
@@ -24577,8 +24592,16 @@ window.Modernizr = function(n, e, t) {
|
|
|
e.appendChild(this.renderer.domElement)
|
|
|
|
|
|
window.stats = new Stats();
|
|
|
- window.stats.begin()
|
|
|
- e.appendChild( stats.dom );
|
|
|
+ window.stats.begin( ()=>{
|
|
|
+ if (document.visibilityState == 'hidden') { stats.pause(); console.log('blur')} //blur后到focus这段之间不会render
|
|
|
+ // 页面变为可见时触发
|
|
|
+ if (document.visibilityState == 'visible') { stats.resume(); console.log('focus')}
|
|
|
+
|
|
|
+ })
|
|
|
+ //e.appendChild( stats.dom );
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
n.prototype.overrideTextures = function() {
|
|
@@ -25194,6 +25217,8 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.updateTextureMemory(),
|
|
|
this.render(),
|
|
|
window.stats && (window.fps = stats.update() || window.fps),
|
|
|
+ //console.log('render'),
|
|
|
+
|
|
|
this.emit(a.AfterRender))
|
|
|
};
|
|
|
n.prototype.getImageData = function() {
|
|
@@ -28229,12 +28254,12 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
,
|
|
|
n.prototype.detectMaxZoomPanoSize = function() {
|
|
|
- //return this.useHighResolutionPanos ? a.isMobile() ? o.tiling.mobileHighQualityOverride ? this.getPanoSize(r.HIGH) : this.getPanoSize(r.STANDARD) : this.useUltraHighResolutionPanos ? this.getPanoSize(r.ULTRAHIGH) : this.getPanoSize(r.HIGH) : this.getPanoSize(r.STANDARD)
|
|
|
- if(window.fps && window.fps.aveFps>56){
|
|
|
+ return this.useHighResolutionPanos ? a.isMobile() ? o.tiling.mobileHighQualityOverride ? this.getPanoSize(r.HIGH) : this.getPanoSize(r.STANDARD) : this.useUltraHighResolutionPanos ? this.getPanoSize(r.ULTRAHIGH) : this.getPanoSize(r.HIGH) : this.getPanoSize(r.STANDARD)
|
|
|
+ /* if(this.useUltraHighResolutionPanos && window.fps && window.fps.aveFps>56 ){
|
|
|
return this.getPanoSize(r.ULTRAHIGH)
|
|
|
}else{
|
|
|
return this.getPanoSize(r.HIGH)
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
}
|
|
|
,
|