xzw 2 years ago
parent
commit
4242a9a620

+ 15 - 9
public/static/lib/potree/potree.js

@@ -76042,12 +76042,15 @@ void main()
 	        
 	        
 	        if( this.nodeMaxLevel==0 )return true
-	        if(camera.type == "OrthographicCamera"){
-	            if(!Potree.Utils.isInsideFrustum(this.pcoGeometry.tightBoundingBox, camera)){
+	        if(camera.type == "OrthographicCamera" || this.testMaxNodeCount < 50){
+	            if(!Potree.Utils.isInsideFrustum(this.bound, camera)){
 	                return true 
 	            }    
 	        }else if( !viewer.atDatasets.includes(this))return true //否则老远就count++
+	          
+	         
 	        
+	         
 	        let levels = this.visibleNodes.map(e=>e.getLevel());
 	        let actMaxLevel = Math.max.apply(null, levels); //实际加载到的最高的node level
 	        if(actMaxLevel <  this.maxLevel)return true// 还没加载到能加载到的最高。  但在细节设置较低时,排除作用微弱。
@@ -76070,8 +76073,13 @@ void main()
 	        
 	        this.testMaxNodeCount ++;
 	        viewer.testMaxNodeCount ++;
-	        //console.log('testMaxNodeCount', this.testMaxNodeCount) 
 	        
+	        //console.log('testMaxNodeCount', this.dataset_id,  this.testMaxNodeCount, 'nodeMaxLevel', this.nodeMaxLevel )
+	        
+	        
+	        if( this.testMaxNodeCount == Potree.config.testNodeCount1 ){//差不多等当前所在数据集nodeMaxLevel加载出来
+	            this.changePointSize();  //重新更新一下大小。因之前用的是nodeMaxLevelPredict (防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
+	        }
 	        if(this.testMaxNodeCount > 100){
 	            console.log('testMaxNodeLevel次数超出,强制结束:',this.dataset_id,  this.nodeMaxLevel,  this.nodeMaxLevelPredict.min); 
 	            this.testMaxNodeLevelDone = 'moreThanMaxCount';
@@ -76492,7 +76500,7 @@ void main()
 	            num_ = Math.pow(num_, 1.05) * 6; 
 	             
 	            
-	            nodeMaxLevel = this.testMaxNodeCount > Potree.config.testNodeCount1 ? this.nodeMaxLevel : this.nodeMaxLevelPredict.max; //防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
+	            nodeMaxLevel = this.testMaxNodeCount >= Potree.config.testNodeCount1 ? this.nodeMaxLevel : this.nodeMaxLevelPredict.max; //防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
 	            
 	            if(sizeFitToLevel || Potree.settings.sizeFitToLevel){//按照点云质量来调整的版本:    近似将pointSizeType换成ADAPTIVE
 	                let str = this.temp.pointSize+':'+this.maxLevel+':'+ nodeMaxLevel;
@@ -81810,7 +81818,7 @@ void main()
 	} */
 
 	const markerSizeInfo = {
-	    minSize : 25 ,  maxSize : 65,   nearBound : 0.2, farBound : 4,
+	    minSize : 30*2 ,  maxSize : 65*2,   nearBound : 0.2, farBound : 4,
 	};
 	const labelSizeInfo = {width2d:190};
 	const mainLabelProp = { 
@@ -82564,7 +82572,7 @@ void main()
 	                replaceColor:this.color,
 	                beReplacedRed: 0.184,   //0.18431372
 	                mapColorReplace:true
-	            }));  
+	            }));   
 	        }  
 	        return markerMats[type + color] 
 	        
@@ -136955,9 +136963,7 @@ ENDSEC
 	                        success = false; 
 	                    }
 	                });
-	                if(oldCount<=Potree.config.testNodeCount1  && this.testMaxNodeCount>Potree.config.testNodeCount1 ){//差不多等当前所在数据集nodeMaxLevel加载出来
-	                    viewer.scene.pointclouds.forEach(e=>{e.changePointSize();}); //重新更新一下大小。因之前用的是nodeMaxLevelPredict (防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
-	                } 
+	                    
 	                if(!success)return true //没有全部加载完,继续循环      
 	                else {
 	                    this.removeEventListener('camera_changed',test);

File diff suppressed because it is too large
+ 1 - 1
public/static/lib/potree/potree.js.map


BIN
public/static/lib/potree/resources/textures/pic_point32.png


BIN
public/static/lib/potree/resources/textures/pic_point_s32.png