|
@@ -18040,12 +18040,12 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.skybox.matrixWorldNeedsUpdate = !0,
|
|
|
this.add(this.skybox);
|
|
|
|
|
|
- setTimeout(function() {
|
|
|
+ /* setTimeout(function() {
|
|
|
//this.hotsCount && this.shineHots()
|
|
|
Hot.beginShineHot()
|
|
|
|
|
|
}
|
|
|
- .bind(this), 1300)
|
|
|
+ .bind(this), 1300) */
|
|
|
|
|
|
|
|
|
|
|
@@ -21988,6 +21988,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.mouseCouldBeClickToMove = !0,
|
|
|
this.mouseDown = !0;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ Hot.mobileAutoPlay(this)
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
|
|
@@ -24066,14 +24070,14 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
|
|
|
,
|
|
|
- n.prototype.updateZoomPano = function() {
|
|
|
+ /* n.prototype.updateZoomPano = function() {
|
|
|
if (!this.panoRenderer.zoomPanoRenderingDisabled && this.mode === u.PANORAMA) {
|
|
|
var e = this.currentPano;
|
|
|
if (e) {
|
|
|
var t = this.zoomLevel > f.zoom.activationThreshold
|
|
|
, i = this.flying && this.nextPano && this.nextPano !== this.currentPano
|
|
|
, n = !i && !this.isWarping()
|
|
|
- , r = t /*&& n*/; // 允许flying状态下加载4K图
|
|
|
+ , r = t //&& n ; // 允许flying状态下加载4K图
|
|
|
this.tileDownloader.tilePrioritizer.setZoomingActive(r),
|
|
|
this.panoRenderer.setZoomingActive(r, e, !0);
|
|
|
var o = function(e, t) {
|
|
@@ -24084,14 +24088,83 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
.bind(this);
|
|
|
r && !e.zoomed ? (o(e, !0),
|
|
|
- this.panoRenderer.enableUltraHighQualityMode(function() {
|
|
|
+ this.panoRenderer. (function() {
|
|
|
this.qualityManager.useUltraHighResolutionPanos && !f.zoom.overridemax && (f.zoom.max = D.ultraHighQualityMaxZoom),
|
|
|
r && o(e, !0)
|
|
|
}
|
|
|
.bind(this))) : !t && e.zoomed && o(e, !1)
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
+ }, */
|
|
|
+
|
|
|
+ n.prototype.updateZoomPano = function() {
|
|
|
+ if (!this.panoRenderer.zoomPanoRenderingDisabled && this.mode === u.PANORAMA && this.currentPano) {
|
|
|
+ let navTileClass = this.qualityManager.getNavZoomClass()
|
|
|
+ let tileClass = this.qualityManager.getMaxZoomClass()
|
|
|
+ let levelThreshold1 = navTileClass == '1k' ? 1.3 : 1.8 , levelThreshold2 = 2 //levelThreshold2不能比zoom.max大也就是不能超过2,否则zoom.max将无法提升到3
|
|
|
+
|
|
|
+ var t = this.zoomLevel > levelThreshold1
|
|
|
+ , i = this.flying && this.nextPano && this.nextPano !== this.currentPano
|
|
|
+ , n = !i && !this.isWarping()
|
|
|
+ , r = t //&& n ; // 允许flying状态下加载4K图
|
|
|
+ this.tileDownloader.tilePrioritizer.setZoomingActive(r),
|
|
|
+ this.panoRenderer.setZoomingActive(r, this.currentPano, !0);
|
|
|
+ var o = function(pano, ifZoom) {
|
|
|
+ this.panoRenderer.resetRenderStatus(pano.id, !1, !0, this.qualityManager.getMaxNavPanoSize()),
|
|
|
+ this.panoRenderer.clearAllQueuedUploadsForPano(pano.id),
|
|
|
+ this.panoRenderer.renderPanoTiles(pano.id, null, !1, !1),
|
|
|
+ pano.setZoomed(ifZoom)
|
|
|
+ }.bind(this);
|
|
|
+
|
|
|
+ let zoomLevelRes = this.qualityManager.zoomLevelResolution
|
|
|
+
|
|
|
+ if (r && (!this.currentPano.zoomed || zoomLevelRes && zoomLevelRes != '4k')) {//needZoom
|
|
|
+ this.currentPano.zoomed || o(this.currentPano, !0);
|
|
|
+
|
|
|
+ if(navTileClass == '1k' && tileClass != '1k' && this.zoomLevel < levelThreshold2){
|
|
|
+ this.panoRenderer.enableHighQuality( function() {//开启2k
|
|
|
+ if(tileClass != '4k'){
|
|
|
+ o(this.currentPano, !0);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+ }else{
|
|
|
+ this.panoRenderer.enableUltraHighQualityMode(function() {//开启4k getMaxZoomPanoSize
|
|
|
+ this.qualityManager.useUltraHighResolutionPanos && !f.zoom.overridemax && (f.zoom.max = D.ultraHighQualityMaxZoom)
|
|
|
+ o(this.currentPano, !0)
|
|
|
+ }.bind(this));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ !t && this.currentPano.zoomed && o(this.currentPano, !1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //有三个级别的话,需要标记zoomLevelResolution,以便更新maxZoomPanoSize判断能下载的最高级别
|
|
|
+ if(r && navTileClass == '1k' && tileClass == '4k' ){ //目前只有手机端navTileClass == '1k'
|
|
|
+ var change = (zoomedFlag)=>{
|
|
|
+ this.qualityManager.updateMaximums()//更新maxZoomPanoSize
|
|
|
+ this.panoRenderer.setupZoomRenderTarget() //更新renderTarget
|
|
|
+ //this.currentPano.setZoomed(t);//更新uniforms贴图
|
|
|
+ }
|
|
|
+ this.qualityManager.zoomLevelResolution = this.zoomLevel >= levelThreshold2 ? '4k' : this.zoomLevel > levelThreshold1? '2k' : '1k'
|
|
|
+
|
|
|
+ if(this.oldZoomLevel < levelThreshold2 && this.zoomLevel >= levelThreshold2){//1k/2k-4k
|
|
|
+ change()
|
|
|
+ o(this.currentPano, t)
|
|
|
+ }else if(this.oldZoomLevel <= levelThreshold1 && this.zoomLevel > levelThreshold1){//1k-2k
|
|
|
+ change()
|
|
|
+ }else if(this.oldZoomLevel > levelThreshold2 && this.zoomLevel <= levelThreshold2){//4k-2k/1k
|
|
|
+ change()
|
|
|
+ o(this.currentPano, t)
|
|
|
+ }else if(this.oldZoomLevel > levelThreshold1 && this.zoomLevel <= levelThreshold1){//2k-1k
|
|
|
+ change()
|
|
|
+ }
|
|
|
+ this.oldZoomLevel = this.zoomLevel
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
n.prototype.checkHasNeighbor = function(pano){//add
|
|
|
for(var i in pano.neighbourPanos ){
|
|
|
if(i == pano.id)continue;
|
|
@@ -27578,6 +27651,19 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.zoomPanoRenderingDisabled = !0
|
|
|
}
|
|
|
,
|
|
|
+
|
|
|
+
|
|
|
+ l.prototype.enableHighQuality = function(e) {
|
|
|
+ //xzw add 如果最多只要2k图的话enableUltraHighQualityMode替换成这个
|
|
|
+ if (!this.qualityManager.highQualityModeStarted) {
|
|
|
+ this.setupZoomRenderTarget()
|
|
|
+ e()
|
|
|
+ this.qualityManager.highQualityModeStarted = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ ,
|
|
|
l.prototype.enableUltraHighQualityMode = function(e) {
|
|
|
if (!this.qualityManager.ultraHighQualityModeEnabled()) {
|
|
|
var t = this.qualityManager.getPanoSize(p.ULTRAHIGH);
|
|
@@ -28259,19 +28345,83 @@ window.Modernizr = function(n, e, t) {
|
|
|
return this.maxZoomPanoSize
|
|
|
}
|
|
|
,
|
|
|
- n.prototype.detectMaxNavPanoSizeClass = function() {
|
|
|
+ /* n.prototype.detectMaxNavPanoSizeClass = function() {
|
|
|
if(settings.mobileNavHigh)return r.HIGH //改
|
|
|
else return this.useHighResolutionPanos ? a.isMobile() ? r.STANDARD : $("#player").height() < this.highQualityThreshold ? r.STANDARD : r.HIGH : r.STANDARD
|
|
|
+ } */
|
|
|
+
|
|
|
+ n.prototype.detectDevice = function(){//add
|
|
|
+ if(a.isMobile()){
|
|
|
+ let area = $("#player").width() * $("#player").height()
|
|
|
+
|
|
|
+ if(area < 768 * 1024){//ipad mini full screen 大场景拍的质量很好默认不需要很高清
|
|
|
+ return 'mobile'
|
|
|
+ }else{
|
|
|
+ return 'bigMobile'
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return 'pc'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ n.prototype.detectMaxNavPanoSizeClass = function() { //xzw 改
|
|
|
+ switch(this.getNavZoomClass()){
|
|
|
+ case '1k':
|
|
|
+ return r.STANDARD;
|
|
|
+ break;
|
|
|
+ case '2k':
|
|
|
+ default:
|
|
|
+ return r.HIGH;
|
|
|
+ case '4k': //虽然这种暂不支持
|
|
|
+ return r.ULTRAHIGH;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
,
|
|
|
n.prototype.detectMaxNavPanoSize = function() {
|
|
|
var e = this.detectMaxNavPanoSizeClass();
|
|
|
return this.getPanoSize(e)
|
|
|
}
|
|
|
,
|
|
|
- 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)
|
|
|
+
|
|
|
+ n.prototype.getMaxZoomClass = function(){//add
|
|
|
+ let type = this.detectDevice()
|
|
|
+ let setting = settings.tileClass[type] //见manage.js的settings
|
|
|
+ return setting.max
|
|
|
}
|
|
|
+ n.prototype.getNavZoomClass = function(){//add
|
|
|
+ let type = this.detectDevice()
|
|
|
+ let setting = settings.tileClass[type]
|
|
|
+ return setting.nav
|
|
|
+ }
|
|
|
+ ,
|
|
|
+ n.prototype.detectMaxZoomPanoSize = function() {//获取当前zoomRenderTarget应下载的最高级别
|
|
|
+ //若是有三个级别,每次只需要加载到当前的zoomLevel;而两级时因为有zoomed来判断是使用基本贴图还是zoomRenderTarget,所以只需要返回最大的即可
|
|
|
+
|
|
|
+ if (this.zoomLevelResolution) {//有三个级别
|
|
|
+ if (this.zoomLevelResolution == '4k' && this.useUltraHighResolutionPanos) {
|
|
|
+ return this.getPanoSize(r.ULTRAHIGH)
|
|
|
+ } else if (this.zoomLevelResolution == '1k' || !this.useHighResolutionPanos) {
|
|
|
+ return this.getPanoSize(r.STANDARD)
|
|
|
+ } else {
|
|
|
+ return this.getPanoSize(r.HIGH)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let tileClass = this.getMaxZoomClass()
|
|
|
+
|
|
|
+ if(tileClass == '1k')return this.getPanoSize(r.STANDARD);
|
|
|
+
|
|
|
+ if(tileClass == '4k' && this.useUltraHighResolutionPanos ){
|
|
|
+ this.getPanoSize(r.ULTRAHIGH);
|
|
|
+ }else{//'2k'
|
|
|
+ return this.getPanoSize(r.HIGH);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ /* 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)
|
|
|
+ } */
|
|
|
,
|
|
|
t.exports = n
|
|
|
}
|