|
@@ -19630,7 +19630,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()
|
|
@@ -19690,7 +19690,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
if(this.minimumTiledPanoLoaded)
|
|
|
{
|
|
|
- if(this.zoomed && this.qualityManager.maxRenderTargetSize > this.qualityManager.maxNavPanoSize)//change 如果放大后和不放大都是2k就不用这个
|
|
|
+ if(this.zoomed && (this.qualityManager.maxRenderTargetSize > this.qualityManager.maxNavPanoSize|| player.qualityManager.getNavZoomClass() == '4k' ))//change 如果放大后和不放大都是2k就不用这个
|
|
|
{
|
|
|
return this.panoRenderer.zoomRenderTarget.texture;
|
|
|
}
|
|
@@ -23034,14 +23034,23 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.intersect = this.getMouseIntersect(null, hots.concat(this.model.colliders));
|
|
|
if(this.intersect){
|
|
|
deal()
|
|
|
- this.intersectHot && $("#player").css("cursor", "pointer");
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+ let intersect = this.intersect
|
|
|
+ if(this.intersectHot){
|
|
|
+ this.intersect = null
|
|
|
+ $("#player").css("cursor", "pointer");
|
|
|
+ }else{
|
|
|
+ if(intersect.object.parent.parent.hidden ){//楼层已隐藏
|
|
|
+ this.intersect = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.intersect = this.getMouseIntersect()
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
- this.intersect = this.getMouseIntersect(),
|
|
|
this.intersect && this.updateClosestPano(this.intersect),
|
|
|
this.closestPano || this.closestPanoInDirection(this.getMouseDirection()) ? (this.reticule.updatePosition(this.position, this.intersect),
|
|
|
f.navigation.panoScores && !f.navigation.mouseDirection && this.closestPanoInDirection(this.getDirection())) : this.reticule.hide()
|
|
@@ -23466,10 +23475,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
|
|
|
|
|
|
- if(!this.model.supportsTiles && i.getSkyboxTexture().image[0].width > 1024){
|
|
|
+ if(!this.model.supportsTiles && i.getSkyboxTexture().image[0].width > 1024 /* || this.qualityManager.getMaxZoomClass() == '4k' */){
|
|
|
setTimeout(()=>{
|
|
|
beginTran()
|
|
|
- },16) //2048的非tile需要延迟到下一帧,因为需要时间载入贴图,否则掉帧
|
|
|
+ }, 50) //2048的非tile需要延迟到下一帧,因为需要时间载入贴图,否则掉帧
|
|
|
}else{
|
|
|
beginTran()
|
|
|
}
|
|
@@ -24526,74 +24535,91 @@ window.Modernizr = function(n, e, t) {
|
|
|
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.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图
|
|
|
- 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
|
|
|
- //this.currentPano.setZoomed(t);//更新uniforms贴图
|
|
|
+ }
|
|
|
+ .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(this.qualityManager.zoomLevelResolution == '4k'){
|
|
|
- this.model.showHighMap()
|
|
|
- }else{
|
|
|
- this.model.hideHighMap()
|
|
|
- }
|
|
|
+ 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
|
|
@@ -28100,7 +28126,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
if(targets[size]){
|
|
|
this.zoomRenderTarget = targets[size]
|
|
|
}else{
|
|
|
- this.zoomRenderTarget = this.initTiledPano(size, false )//放大后不使用抗锯齿,否则消耗更多内存
|
|
|
+ this.zoomRenderTarget = this.initTiledPano(size, true )//放大后不使用抗锯齿,否则消耗更多内存
|
|
|
targets[size] = this.zoomRenderTarget
|
|
|
}
|
|
|
|
|
@@ -28856,7 +28882,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
case '2k':
|
|
|
default:
|
|
|
return r.HIGH;
|
|
|
- case '4k': //虽然这种暂不支持
|
|
|
+ case '4k':
|
|
|
return r.ULTRAHIGH;
|
|
|
}
|
|
|
}
|
|
@@ -29362,8 +29388,15 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.priorityCriteria.cameraPosition.copy(t),
|
|
|
this.priorityCriteria.cameraDir.copy(i),
|
|
|
this.priorityCriteria.upcomingPanos = n,
|
|
|
- this.maxNavQuality = this.qualityManager.getMaxNavPanoSize(),
|
|
|
+
|
|
|
+ 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() {
|
|
@@ -31400,15 +31433,24 @@ window.Modernizr = function(n, e, t) {
|
|
|
if(urlFirstView){
|
|
|
try{
|
|
|
urlFirstView = replaceAll(urlFirstView, "pano:", '"pano":"')
|
|
|
- urlFirstView = replaceAll(urlFirstView, ",qua:", '","qua":[')
|
|
|
- urlFirstView = "{"+urlFirstView+"]}"
|
|
|
+ urlFirstView+='"'
|
|
|
+ if(urlFirstView.includes('qua')){
|
|
|
+ urlFirstView = replaceAll(urlFirstView, ",qua:", ',"qua":[')
|
|
|
+ urlFirstView += ']'
|
|
|
+ }
|
|
|
+
|
|
|
+ urlFirstView = "{"+urlFirstView+"}"
|
|
|
let info = JSON.parse(urlFirstView);
|
|
|
i.pano = t.index[info.pano] //panos.get(info.pano)
|
|
|
if(!i.pano){
|
|
|
urlFirstView = false
|
|
|
console.error('检测到firstView但是 找不到该pano')
|
|
|
}else{
|
|
|
- i.quaternion = new THREE.Quaternion().fromArray(info.qua)
|
|
|
+ if(info.qua){
|
|
|
+ i.quaternion = new THREE.Quaternion().fromArray(info.qua)
|
|
|
+ }else{
|
|
|
+ i.quaternion = new THREE.Quaternion()
|
|
|
+ }
|
|
|
i.zoom = -1;
|
|
|
i.mode = "panorama"
|
|
|
i.setByUrl = true
|
|
@@ -60418,6 +60460,9 @@ var addMagnifier = function(){
|
|
|
展示版导览改为就近导览,所以一开始并非第一个。如果在最后一个点上会自动从头开始
|
|
|
|
|
|
|
|
|
-
|
|
|
+ 关于pc-nav 4k
|
|
|
+ 两种选择,1 按照正常流程,因为nav为4k所以直接使用4k的tiledPanoRenderTarget, 但useUltraHighResolutionPanos需要开启才能达到4k,否则是2k。这样的话第一个点位需要手动重新替换tiledPanoRenderTarget,所以废弃
|
|
|
+ 2 使zoomed一直为true,直接使用zoomRenderTarget。 参考之前写过的三屏的本地4k。 且创建的tiledPanoRenderTarget不能超过2048否则过渡卡顿;且直到到达该点后才能下载4k,否则不会渲染到zoomRenderTarget上
|
|
|
+
|
|
|
*/
|
|
|
|