xzw 2 gadi atpakaļ
vecāks
revīzija
f1a255bd9a

+ 2 - 2
src/ExtendPointCloudOctree.js

@@ -617,8 +617,8 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
                 opacity = value
             }else{
                 if(Potree.settings.sizeFitToLevel){//按照点云质量来调整的版本:
-                    let base = this.material.spacing / Math.pow(1.5, this.maxLevel) //随着level提高,点云重叠几率增多
-                    let minBase = this.material.spacing / Math.pow(1.5, this.nodeMaxLevel)
+                    let base = this.material.spacing / Math.pow(1.7, this.maxLevel) //随着level提高,点云重叠几率增多
+                    let minBase = this.material.spacing / Math.pow(1.7, this.nodeMaxLevel)
                     let ratio = Math.min(1 / base, 1 / minBase / 3) //ratio为一个能使opacity不大于1 的 乘量,minBase要除以一个数,该数调越大减弱效果越强。level越低opacity和面板越接,level越高效果越弱,以减免过度重叠后的亮度。
                     opacity = base * ratio * num
                     if(!canMoreThanOne){

+ 4 - 4
src/custom/modules/datasetAlignment/Alignment.js

@@ -296,9 +296,9 @@ var Alignment = {
         
         this.SplitScreen.split({alignment:true})
          
-        viewer.images360.panos.forEach(pano=>{
+        /* viewer.images360.panos.forEach(pano=>{
             Potree.Utils.updateVisible(pano.mapMarker, 'split4Screens', false)
-        }) 
+        }) */ 
         
         viewer.viewports.find(e=>e.name == 'mapViewport').alignment = {rotate:true,translate:true};
         viewer.viewports.find(e=>e.name == 'right').alignment = {translate:true, translateVec:new THREE.Vector3(0,0,1)}; //只能上下移动
@@ -326,9 +326,9 @@ var Alignment = {
         
         
         this.SplitScreen.recover()
-        viewer.images360.panos.forEach(pano=>{
+        /* viewer.images360.panos.forEach(pano=>{
             Potree.Utils.updateVisible(pano.mapMarker, 'split4Screens', true)
-        }) 
+        })  */
         this.editing = false
         this.history.clear() 
         viewer.updateFpVisiDatasets()

+ 1 - 0
src/custom/modules/panos/Images360.js

@@ -2155,6 +2155,7 @@ export class Images360 extends THREE.EventDispatcher{
         this.panos.forEach(e=>{
             this.neighbourMap[e.id] = {}
             e.label && Potree.Utils.setObjectLayers(e.label, 'bothMapAndScene') 
+            e.label2 && Potree.Utils.setObjectLayers(e.label2, 'bothMapAndScene') 
         }) 
         
         this.tileDownloader.setPanoData(this.panos, [] /* , Potree.settings.number */);

+ 4 - 0
src/custom/modules/panos/Panorama.js

@@ -561,6 +561,10 @@ class Panorama extends THREE.EventDispatcher{
         this.label2.scale.set(s,s,s)
         Potree.Utils.updateVisible(this.label2, 'notDisplay', false)
         //Potree.Utils.updateVisible(this.label2, 'panoVisi', this.visible)
+        
+        
+        
+        Potree.Utils.setObjectLayers(this.label2, 'bothMapAndScene') 
     }
     
     removeTextLabel(){

+ 3 - 1
src/custom/modules/siteModel/SiteModel.js

@@ -176,7 +176,8 @@ var SiteModel = {
         
         
         viewer.images360.panos.forEach(pano=>{
-            Potree.Utils.setObjectLayers(pano.marker, 'siteModelMapUnvisi' ) 
+            Potree.Utils.setObjectLayers(pano.marker, 'siteModelMapUnvisi' )
+            Potree.Utils.setObjectLayers(pano.label2, 'bothMapAndScene')             
         }) 
         mapViewport.layersAdd('siteModeOnlyMapVisi') //只有mapViewport能看到marker
        
@@ -204,6 +205,7 @@ var SiteModel = {
 
         viewer.images360.panos.forEach(pano=>{
             Potree.Utils.setObjectLayers(pano.marker, 'sceneObjects' ) 
+            Potree.Utils.setObjectLayers(pano.label2, 'bothMapAndScene') 
         })
         
         mapViewport.layersRemove('siteModeOnlyMapVisi') 

+ 3 - 3
src/custom/settings.js

@@ -108,13 +108,13 @@ const config = {//配置参数   不可修改
         }, 
         
         fourViewports:{//分四屏时防止卡顿
-            maxLevelPercent: 0.4,  
-            pointBudget :1*1000*1000, // 只要限制这个就足够 (为什么分屏focus区域不同会闪烁,navvis不会)(navvis:maxLevel:5,pointBudget:1*1000*1000)
+            maxLevelPercent: 0.8,  
+            pointBudget :3*1000*1000, // 只要限制这个就足够 (为什么分屏focus区域不同会闪烁,navvis不会)(navvis:maxLevel:5,pointBudget:1*1000*1000)
             minNodeSize : 70,
         }, 
         fourViewportsMain:{//分四屏时防止卡顿
             maxLevelPercent: 0.8,  
-            pointBudget :1*1000*1000, // 只要限制这个就足够 (为什么分屏focus区域不同会闪烁,navvis不会)(navvis:maxLevel:5,pointBudget:1*1000*1000)
+            pointBudget :3*1000*1000, // 只要限制这个就足够 (为什么分屏focus区域不同会闪烁,navvis不会)(navvis:maxLevel:5,pointBudget:1*1000*1000)
             minNodeSize : 70,
         }   
         ,

+ 12 - 2
src/custom/utils/SplitScreen4Views.js

@@ -77,7 +77,11 @@ SplitScreen4Views.split = function(o={}){
     }) */
         
         
-        
+    viewer.images360.panos.forEach(pano=>{
+        pano.addLabel2()
+        Potree.Utils.updateVisible(pano.label2, 'notDisplay', true)
+        pano.dispatchEvent({type:'changeMarkerTex',name:'ring'})
+    }) 
         
     //材质 
     this.statesBefore = { 
@@ -137,7 +141,7 @@ SplitScreen4Views.split = function(o={}){
                 Potree.settings.pointDensity = 'fourViewports' //强制降低点云质量
                 
                 //侧面重叠概率更大,所以透明度调小
-                e.changePointOpacity(this.name == "mapViewport" ? 0.6 : 0.06/* newOpacityMap.get(e).get(viewport), true */);  //多数据集有的数据集很小,放大后显示特别淡
+                e.changePointOpacity(this.name == "mapViewport" ? 0.2 : 0.06/* newOpacityMap.get(e).get(viewport), true */);  //多数据集有的数据集很小,放大后显示特别淡
                 //console.log(e.name, viewport.name, e.temp.pointOpacity, e.material.opacity)
             }                 
         })  
@@ -190,6 +194,12 @@ SplitScreen4Views.recover = function(){
     /* viewer.images360.panos.forEach(pano=>{
         Potree.Utils.updateVisible(pano.mapMarker, 'split4Screens', true)
     }) */
+    
+    viewer.images360.panos.forEach(pano=>{
+        Potree.Utils.updateVisible(pano.label2, 'notDisplay', false  )
+        pano.dispatchEvent({type:'changeMarkerTex',name:'default'})
+    })
+    
     mapViewport.noPointcloud = true
     { 
         this.enableMap(Potree.settings.mapEnable)

+ 1 - 1
src/materials/shaders/pointcloud_new.vs

@@ -1025,7 +1025,7 @@ void main() {
        // vOpacity = clamp(vOpacity, 0.001, 1.0);  
     }  
     
-    vOpacity *= max(0.1,  (1.0 - normalZ));//垂直朝相机时降低透明度 
+    vOpacity *= max(0.02,  pow((1.0 - normalZ),5.0));//垂直朝相机时降低透明度 
 
     // POINT SIZE
     float pointSize = getPointSize();

+ 12 - 1
src/navigation/FirstPersonControlsNew.js

@@ -233,8 +233,19 @@ export class FirstPersonControls extends THREE.EventDispatcher {
                             pointclouds = a && e.drag.intersectStart.pointclouds && Common.getMixedSet(Alignment.selectedClouds, e.drag.intersectStart.pointclouds).length && Alignment.selectedClouds
                             
                         }else{ */
-                            pointclouds = a && e.drag.intersectStart.pointcloud && [e.drag.intersectStart.pointcloud]
+                            //pointclouds = a && e.drag.intersectStart.pointcloud && [e.drag.intersectStart.pointcloud]
                         //} 
+                        
+                        if(a && e.drag.intersectStart.pointcloud){
+                            pointclouds = [e.drag.intersectStart.pointcloud]
+                            if(e.drag.intersectStart.pointcloud.dataset_id == Potree.settings.originDatasetId){
+                                let p = e.drag.intersectStart.pointclouds.find(p=>p.dataset_id != Potree.settings.originDatasetId)
+                                if(p) pointclouds = [p] 
+                            }
+                        }
+                        
+                        
+                        
                     }
                       
                     if(pointclouds){