xzw 2 years ago
parent
commit
4fe67655ac

+ 1 - 1
src/custom/modules/panos/Images360.js

@@ -599,7 +599,7 @@ export class Images360 extends THREE.EventDispatcher{
 
 
 	cancelFlyToPano(toPano){//取消当前已有的飞行准备,前提是相机还未移动 
-        if(viewer.mainViewport.view.isFlying() || toPano && this.latestToPano != toPano)return
+        if(/* viewer.mainViewport.view.isFlying() ||  */toPano && this.latestToPano != toPano)return
         //Potree.Log('cancelFlyToPano', this.latestToPano && this.latestToPano.pano.id)
         this.nextPano = null 
         this.latestToPano = null 

+ 1 - 1
src/custom/objects/tool/Measure.js

@@ -681,7 +681,7 @@ export class Measure extends ctrlPolygon{
     focus(){  
     
     
-        let dontChangeCamDir = viewer.mainViewport.camera.type == 'OrthographicCamera' && math.closeTo( viewer.mainViewport.view.pitch , -1.57079632)  //俯视图不改角度
+        let dontChangeCamDir = viewer.mainViewport.camera.type == 'OrthographicCamera' /* && math.closeTo( viewer.mainViewport.view.pitch , -1.57079632)  */ // 不改角度
     
         viewer.focusOnObject(this, 'measure', null, {dontChangeCamDir})
         

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

@@ -3495,7 +3495,7 @@ export class Viewer extends ViewerBase{
                 boundSize.y = Math.max(min, boundSize.y)
             }
             if(camera.type == 'OrthographicCamera'){
-                dis = boundSize.length() / 2
+                dis = boundSize.length()  
             }else{
                 let aspect = boundSize.x / boundSize.y
                 if(camera.aspect > aspect){//视野更宽则用bound的纵向来决定

+ 3 - 5
src/viewer/ExtendView.js

@@ -409,7 +409,7 @@ class ExtendView extends View {
     tranCamera(viewport,  info, duration,  easeName){
         viewport.camera = info.midCamera
         //viewport.camera.matrixWorld = info.endCamera.matrixWorld
-        
+        console.log('tranCamera')
          
         //viewer.setCameraMode(CameraMode.ORTHOGRAPHIC) 
         info.midCamera.projectionMatrix.copy(info.startCamera.projectionMatrix)
@@ -418,9 +418,7 @@ class ExtendView extends View {
         info.onUpdate = (progress, delta)=>{ 
             lerp.matrix4(info.midCamera.projectionMatrix, info.endCamera.projectionMatrix)(progress) 
             
-            /* console.log('matrixWorld', viewport.camera.position.toArray(), viewport.camera.matrixWorld.toArray())
-            console.log('projectionMatrix', info.endCamera.zoom,  viewport.camera.projectionMatrix.toArray())
-             */
+            
             onUpdate && onUpdate(progress, delta)
         }
         
@@ -432,7 +430,7 @@ class ExtendView extends View {
             }) 
             viewer.dispatchEvent({type:'camera_changed', viewport:viewer.mainViewport, changeInfo:{}})//update sprite
             
-            
+            console.log('tranCamera end')
             callback && callback()
         } 
         info.forbitCancel = true 

+ 1 - 1
src/viewer/NavigationCube.js

@@ -584,7 +584,7 @@ class NavigationCube{
                     if(viewer.mainViewport.view.isFlying())return
                     
                     let dir = directions[name]
-                    if(name == 'top'){
+                    if(name == 'Top'){
                         let baseLine = viewer.scene.measurements.find(e=>e.isBaseLine && e.points.length == 2)  //使基准线在俯视图中水平
                         let yaw = baseLine ? new THREE.Vector2().subVectors(baseLine.points[0], baseLine.points[1]).angle() : 0 
                         dir = baseLine ? {dir: new THREE.Vector3(0,0,-1),yaw,pitch: -1.5707963267948966} : directions[name]