xzw 2 年之前
父节点
当前提交
a859b9dd4f
共有 3 个文件被更改,包括 5 次插入6 次删除
  1. 1 1
      src/custom/potree.shim.js
  2. 1 1
      src/custom/settings.js
  3. 3 4
      src/custom/viewer/ViewerNew.js

+ 1 - 1
src/custom/potree.shim.js

@@ -1408,7 +1408,7 @@ Potree.updateVisibility = function(pointclouds, camera, areaSize){
                 if( !sphere.containsPoint(camObjPos) ){ //add 优先加载屏幕中央的点云(手机端缩小离远效果明显,不会那么稀疏)
                 if( !sphere.containsPoint(camObjPos) ){ //add 优先加载屏幕中央的点云(手机端缩小离远效果明显,不会那么稀疏)
                     let dir = new THREE.Vector3().subVectors(center, camObjPos).normalize() 
                     let dir = new THREE.Vector3().subVectors(center, camObjPos).normalize() 
                     let cos = 1+dir.dot(camObjDir) //0-2
                     let cos = 1+dir.dot(camObjDir) //0-2
-                    weight *= cos//Math.pow(cos,0.5)   //幂越高,旁边的容易加载不到,出现缺块
+                    weight *= cos/2//Math.pow(cos,0.5)   //幂越高,旁边的容易加载不到,出现缺块
                 } 
                 } 
                 
                 
 				if(distance - radius < 0){
 				if(distance - radius < 0){

+ 1 - 1
src/custom/settings.js

@@ -76,7 +76,7 @@ const config = {//配置参数   不可修改
     },
     },
     
     
     transitionsTime:{
     transitionsTime:{
-        flyMinTime : 400  ,  // 毫秒/米
+        flyMinTime : 300  ,  // 毫秒/米
         flytimeDistanceMultiplier: 130 ,
         flytimeDistanceMultiplier: 130 ,
         panoToPanoMax: 1800 , 
         panoToPanoMax: 1800 , 
         flyIn:1000,
         flyIn:1000,

+ 3 - 4
src/custom/viewer/ViewerNew.js

@@ -796,8 +796,7 @@ export class Viewer extends ViewerBase{
         let byTex=0,  byCloud=0;
         let byTex=0,  byCloud=0;
         let len = shelterHistory.length;
         let len = shelterHistory.length;
         let waitCloud = []
         let waitCloud = []
-        let max = this.mainViewport.view.isFlying() ? 1 : Math.min(1/depthTiming, 10); //起飞时lastFrameChanged还是false,所以不用lastFrameChanged
-        let maxTexCount = Common.getBestCount('shelterMaxDepthSample', 1,  max,   1,  13   /*  ,true */    ) 
+        let maxTexCount = Common.getBestCount('shelterMaxDepthSample', 1,  50,   1,  13   /*  ,true */    ) 
         
         
         
         
         
         
@@ -4034,8 +4033,8 @@ export class Viewer extends ViewerBase{
        
        
         performance.mark('loop-start') ;// 无论有没有reportTimings都要获取,因为getBestCound需要
         performance.mark('loop-start') ;// 无论有没有reportTimings都要获取,因为getBestCound需要
         
         
-        let depthTiming = Potree.timeCollect.depthSampler.median 
-        this.shelterCount = {byTex:0, byCloud:0,   maxByTex: THREE.Math.clamp(0.2/depthTiming, 1, 10), maxByCloud:0   } //清空 因ifPointBlockedByIntersect可能在任何时候触发,所以需要一开始就定义这个,且每次计算最大可计算次数太麻烦了就定义一个吧。
+       
+        this.shelterCount = {byTex:0, byCloud:0,   maxByTex: 100, maxByCloud:0   } //清空 因ifPointBlockedByIntersect可能在任何时候触发,所以需要一开始就定义这个,且每次计算最大可计算次数太麻烦了就定义一个吧。