Selaa lähdekoodia

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

xushiting 2 vuotta sitten
vanhempi
commit
c364325e4f

+ 18 - 37
public/static/lib/potree/potree.js

@@ -54325,13 +54325,18 @@
 	    
 	    
 	    tranCamera(viewport,  info, duration,  easeName){
-	        viewport.camera = info.midCamera;
+	        viewport.camera = info.midCamera; 
+	        viewport.tranAimCamera = info.endCamera;
+	        
 	        //viewport.camera.matrixWorld = info.endCamera.matrixWorld
 	        console.log('tranCamera');
 	         
 	        //viewer.setCameraMode(CameraMode.ORTHOGRAPHIC) 
 	        info.midCamera.projectionMatrix.copy(info.startCamera.projectionMatrix);
 	        
+	        viewer.updateScreenSize({forceUpdateSize:true});  //更新endCamera的projection,因此前可能resize过
+	        
+	        
 	        let onUpdate = info.onUpdate;
 	        info.onUpdate = (progress, delta)=>{ 
 	            lerp.matrix4(info.midCamera.projectionMatrix, info.endCamera.projectionMatrix)(progress); 
@@ -54342,7 +54347,8 @@
 	        
 	        let callback = info.callback;
 	        info.callback = info.cancelFun = ()=>{ 
-	            viewport.camera = info.endCamera;  
+	            viewport.camera = info.endCamera; 
+	            viewport.tranAimCamera = null; 
 	            viewer.scene.measurements.forEach((e)=>{ 
 	                Potree.Utils.updateVisible(e, 'tranCamera', true); 
 	            }); 
@@ -88722,20 +88728,7 @@ void main()
 	            gl.bindVertexArray = extVAO.bindVertexArrayOES.bind(extVAO);
 	        }
 
-	                                                            
-	                           
-	 
-	                                                
-	                                      
-	                               
-	                                                                            
-	                  
-	       /*  let oldClear = gl.clear; 
-	        gl.clear = (bits)=>{
-	             console.error('clear')
-	        }   
-	 */
-	        
+	             
 	    }
 	    
 	    
@@ -88794,9 +88787,11 @@ void main()
 	                if(height_ == 0)return  //avoid NAN
 	                
 	                let aspect = width_ / height_;  //camera的参数精确些,不用视口的归整的resolution像素值,否则hasChange无法为true, 导致canvasResize了但map没update从而闪烁
-	                view.camera.aspect = aspect;
 	                
-	                if(view.camera.type == "OrthographicCamera"){
+	                let camera = view.tranAimCamera || view.camera; //当view.camera是viewer.scene.cameraBasic时使用tranAimCamera
+	                camera.aspect = aspect;
+	                
+	                if(camera.type == "OrthographicCamera"){
 	                     
 	                    /* //不改宽度 同4dkk
 	                    var heightHalf = view.camera.right / aspect 
@@ -88804,10 +88799,10 @@ void main()
 	                    view.camera.bottom = -heightHalf  */
 	                    //高宽都改 使大小不随视口大小改变  navvis (直接和视口大小一致即可,通过zoom来定大小)
 	                     
-	                    view.camera.left = -width_/2; 
-	                    view.camera.right = width_/2;
-	                    view.camera.bottom = -height_/2;
-	                    view.camera.top = height_/2;
+	                    camera.left = -width_/2; 
+	                    camera.right = width_/2;
+	                    camera.bottom = -height_/2;
+	                    camera.top = height_/2;
 	                    
 	                    
 	                }else {   
@@ -88815,7 +88810,7 @@ void main()
 	                
 	                }
 	                
-	                view.camera.updateProjectionMatrix();
+	                camera.updateProjectionMatrix();
 	            });
 	        }
 	        
@@ -88876,21 +88871,7 @@ void main()
 	        
 	       
 	        let {width, height} = size;
-	        
-	        
-	        
-	        
-	        /* let oldBudget = Potree.pointBudget;
-	        Potree.pointBudget = Math.max(10 * 1000 * 1000, 2 * oldBudget);
-	        let result = Potree.updatePointClouds(this.scene.pointclouds, camera, size );
-	        Potree.pointBudget = oldBudget;
 	         
-	         
-			this.dispatchEvent({ //resize everything  such as lines  targets
-	            type: 'resize', 
-	            resolution: new THREE.Vector2(width,height), 
-	        });*/
-	       
 			let target = new WebGLRenderTarget(width, height, {
 				format: RGBAFormat,
 			});

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
public/static/lib/potree/potree.js.map


+ 6 - 6
src/graphic/ListenLayer.js

@@ -1319,12 +1319,6 @@ export default class ListenLayer {
         VectorType.Text,
         SelectState.Select
       );
-    } else if (this.modifyPoint.svgId) {
-      stateService.setSelectItem(
-        this.modifyPoint.svgId,
-        VectorType.SVG,
-        this.modifyPoint.index
-      );
     } else if (this.modifyPoint.magnifierId) {
       // if (this.modifyPoint.index == 0) {
       //点击隐藏的放大镜不显示
@@ -1336,6 +1330,12 @@ export default class ListenLayer {
       // } else {
       stateService.setSelectState(this.modifyPoint.index);
       // }
+    } else if (this.modifyPoint.svgId) {
+      stateService.setSelectItem(
+        this.modifyPoint.svgId,
+        VectorType.SVG,
+        this.modifyPoint.index
+      );
     } else if (this.modifyPoint.linkedEdgeId) {
       stateService.setSelectItem(
         this.modifyPoint.linkedEdgeId,

+ 0 - 1
src/graphic/Renderer/Draw.js

@@ -897,7 +897,6 @@ export default class Draw {
       ...vector.position,
       radius,
     });
-    console.log(vector);
     const pt = coordinate.getScreenXY(vector.position);
     // vector.setPopPosition();
     const target = {

+ 5 - 5
src/graphic/Renderer/Render.js

@@ -180,16 +180,16 @@ export default class Render {
       this.drawGeometry(texts[key]);
     }
 
-    const magnifiers = dataService.getMagnifiers();
-    for (const magnifiersKey in magnifiers) {
-      this.drawGeometry(magnifiers[magnifiersKey]);
-    }
-
     const svgs = dataService.getSVGs();
     for (const key in svgs) {
       this.drawGeometry(svgs[key]);
     }
 
+    const magnifiers = dataService.getMagnifiers();
+    for (const magnifiersKey in magnifiers) {
+      this.drawGeometry(magnifiers[magnifiersKey]);
+    }
+
     //this.drawGeometry(dataService.getImg());
     this.redrawElements();