|
@@ -19349,7 +19349,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
this.tileDownloader.clearForceQueue(),
|
|
|
this.tileDownloader.forceQueueTilesForPano(this, i, n, h, u, s),
|
|
|
- this.tiledPanoRenderTarget = this.panoRenderer.activateTiledPano(this, this.qualityManager.getMaxNavPanoSize(), o),
|
|
|
+ this.tiledPanoRenderTarget = this.panoRenderer.activateTiledPano(this, Math.min(2048, this.qualityManager.getMaxNavPanoSize()) , o), //不要超过2048否则漫游到下一个点时卡顿
|
|
|
this.panoRenderer.renderPanoTiles(this.id, n, a)
|
|
|
}
|
|
|
return c.promise()
|
|
@@ -19400,7 +19400,26 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
,
|
|
|
n.prototype.getSkyboxTexture = function() {
|
|
|
- return this.tiled ? this.minimumTiledPanoLoaded ? this.zoomed ? this.panoRenderer.zoomRenderTarget.texture : this.tiledPanoRenderTarget.texture : null : this.solidSkybox
|
|
|
+ //return this.tiled ? this.minimumTiledPanoLoaded ? this.zoomed ? this.panoRenderer.zoomRenderTarget.texture : this.tiledPanoRenderTarget.texture : null : this.solidSkybox
|
|
|
+ if(!this.tiled){
|
|
|
+ return this.solidSkybox
|
|
|
+ }
|
|
|
+ if(this.minimumTiledPanoLoaded)
|
|
|
+ {
|
|
|
+ if(this.zoomed && (this.qualityManager.maxRenderTargetSize > this.qualityManager.maxNavPanoSize|| player.qualityManager.getNavZoomClass() == '4k' ))//change 如果放大后和不放大都是2k就不用这个
|
|
|
+ {
|
|
|
+ return this.panoRenderer.zoomRenderTarget.texture;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.tiledPanoRenderTarget.texture.mapping = THREE.UVMapping//add
|
|
|
+ return this.tiledPanoRenderTarget.texture;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|
|
|
,
|
|
|
n.prototype.onTileRenderFail = function(e, t, i) {
|
|
@@ -24232,106 +24251,96 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
y.start(fun, dur, callback, null, 0, A[f.transition.blendEasing], null, window.fovTranId)
|
|
|
}
|
|
|
-
|
|
|
- ,
|
|
|
- /* 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 ; // 允许flying状态下加载4K图
|
|
|
- this.tileDownloader.tilePrioritizer.setZoomingActive(r),
|
|
|
- this.panoRenderer.setZoomingActive(r, e, !0);
|
|
|
- var o = function(e, t) {
|
|
|
- this.panoRenderer.resetRenderStatus(e.id, !1, !0, this.qualityManager.getMaxNavPanoSize()),
|
|
|
- this.panoRenderer.clearAllQueuedUploadsForPano(e.id),
|
|
|
- this.panoRenderer.renderPanoTiles(e.id, null, !1, !1),
|
|
|
- e.setZoomed(t)
|
|
|
- }
|
|
|
- .bind(this);
|
|
|
- r && !e.zoomed ? (o(e, !0),
|
|
|
- this.panoRenderer.enableUltraHighQualityMode(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.1 : 1.5 , levelThreshold2 = 1.7 //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);
|
|
|
+
|
|
|
+ if(navTileClass == '4k'){
|
|
|
+ var r = true
|
|
|
+ }else{
|
|
|
+ var levelThreshold1 = navTileClass == '1k' ? 1.1 : 1.5 , levelThreshold2 = 1.8 //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图
|
|
|
+ }
|
|
|
|
|
|
- let zoomLevelRes = this.qualityManager.zoomLevelResolution
|
|
|
+
|
|
|
+ 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);
|
|
|
|
|
|
- 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{
|
|
|
+
|
|
|
+ if(navTileClass == '4k'){
|
|
|
+ if (!this.currentPano.zoomed) {
|
|
|
+ o(this.currentPano, !0);
|
|
|
this.panoRenderer.enableUltraHighQualityMode(function() {//开启4k getMaxZoomPanoSize
|
|
|
- this.qualityManager.useUltraHighResolutionPanos && !f.zoom.overridemax && (f.zoom.max = D.ultraHighQualityMaxZoom)
|
|
|
+ this.qualityManager.useUltraHighResolutionPanos && (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
|
|
|
- if(this.qualityManager.zoomLevelResolution == '4k'){
|
|
|
- this.model.showHighMap()
|
|
|
- }else{
|
|
|
- this.model.hideHighMap()
|
|
|
- }
|
|
|
+ }
|
|
|
+ .bind(this));
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ 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);
|
|
|
}
|
|
|
- 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
|
|
|
- }
|
|
|
+
|
|
|
+ //有三个级别的话,需要标记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贴图
|
|
|
+
|
|
|
+ if(this.qualityManager.zoomLevelResolution == '4k'){
|
|
|
+ this.model.showHighMap()
|
|
|
+ }else{
|
|
|
+ this.model.hideHighMap()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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
|
|
@@ -28925,6 +28934,13 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.priorityCriteria.upcomingPanos = n,
|
|
|
this.maxNavQuality = this.qualityManager.getMaxNavPanoSize(),
|
|
|
this.maxZoomQuality = this.qualityManager.getMaxZoomPanoSize()
|
|
|
+
|
|
|
+
|
|
|
+ if(!player.panoRenderer.isPanoZoomed(e.id)){ //xzw add,直到到达该点后才能下载4k,否则不会渲染到zoomRenderTarget上
|
|
|
+ this.maxNavQuality = Math.min(2048, this.maxNavQuality)
|
|
|
+ this.maxZoomQuality = Math.min(2048, this.maxZoomQuality)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
n.prototype.filterAndPrioritize = function() {
|