xzw 2 年之前
父節點
當前提交
5421f3f92a
共有 3 個文件被更改,包括 9 次插入9 次删除
  1. 1 1
      src/custom/potree.shim.js
  2. 2 2
      src/custom/settings.js
  3. 6 6
      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 优先加载屏幕中央的点云(手机端缩小离远效果明显,不会那么稀疏)
                     let dir = new THREE.Vector3().subVectors(center, camObjPos).normalize() 
                     let cos = 1+dir.dot(camObjDir) //0-2
-                    weight *= cos//Math.pow(cos,0.5)   //幂越高,旁边的容易加载不到,出现缺块
+                    weight *= cos/2//Math.pow(cos,0.5)   //幂越高,旁边的容易加载不到,出现缺块 如SS-t-7DUfWAUZ3V
                 } 
                 
 				if(distance - radius < 0){

+ 2 - 2
src/custom/settings.js

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

+ 6 - 6
src/custom/viewer/ViewerNew.js

@@ -883,8 +883,8 @@ export class Viewer extends ViewerBase{
         let byTex=0,  byCloud=0;
         let len = shelterHistory.length;
         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 */    ) 
         
         
         
@@ -920,7 +920,7 @@ export class Viewer extends ViewerBase{
         }
         
         let maxCloudCount
-        if(byTex < maxTexCount && waitCloud.length){
+        if(byTex < maxTexCount && waitCloud.length ){
             maxCloudCount = this.lastFrameChanged ? Common.getBestCount('shelterMaxCloud', 0, 2,  4,  8    /*  ,true   */   ) : 5;
             let waitCloud2 = []
             if(maxCloudCount){
@@ -959,7 +959,7 @@ export class Viewer extends ViewerBase{
                     }
                     history.ifShelter = ifShelter
                     byCloud++
-                    //console.log('补2',  history.pos3d.toArray()) 
+                    console.log('补2',  history.pos3d.toArray()) 
                     delete history.waitCompute
                 })
             
@@ -4173,8 +4173,8 @@ export class Viewer extends ViewerBase{
         performance.mark('loop-start') ;// 无论有没有reportTimings都要获取,因为getBestCound需要
         
         this.interacted = false
-        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可能在任何时候触发,所以需要一开始就定义这个,且每次计算最大可计算次数太麻烦了就定义一个吧。