xzw 1 year ago
parent
commit
3114e2fa92
2 changed files with 11 additions and 3 deletions
  1. 10 2
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map

+ 10 - 2
public/lib/potree/potree.js

@@ -61639,6 +61639,7 @@
 					this.loadPoints();
 				}
 			} else {
+	            this.pcoGeometry.dispatchEvent({type:'updateNodeMaxLevel',level:this.level});//add
 				this.loadPoints();
 			}
 		}
@@ -77019,7 +77020,7 @@ void main()
 	            
 	        }else {  
 	            
-	             //else if(prop.type == 'las' || prop.type == 'ply')
+	             //else if(prop.type == 'las' || prop.type == 'ply' || prop.type == 'laz' ) 
 	 
 	            Potree.loadPointCloudScene(prop.url, prop.type, prop.modelId, prop.title, (pointcloud)=>{  
 	                pointcloud.matrixAutoUpdate = true;
@@ -90967,6 +90968,11 @@ void main()
 	        this.boundingBox = this.pcoGeometry.tightBoundingBox;//this.pcoGeometry.boundingBox;  //boundingBox是正方体,所以换掉
 			this.boundingSphere = this.boundingBox.getBoundingSphere(new Sphere());
 	        this.nodeMaxLevel = 0;//add
+	        if (!this.pcoGeometry.loader.version.equalOrHigher('1.5')) {//las 一级一级增长的,但是testNodeMaxLevel时需要大于0
+	            this.nodeMaxLevel = 1;//add
+	        }
+	        
+	        
 	        this.maxLevel = Infinity;
 	        this.temp = { sizeFitToLevel:{}, opacity:{}};//add
 	        //add 
@@ -91023,7 +91029,9 @@ void main()
 	             
 	             console.log('updateNodeMaxLevel ' + this.dataset_id + " : "+ this.nodeMaxLevel);                
 	              
-	            this.setPointLevel();//重新计算
+	            setTimeout(()=>{
+	               this.setPointLevel();//重新计算 
+	            },1);
 	             
 	            if(!Potree.settings.sizeFitToLevel){
 	                this.changePointSize(); 

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