xzw 2 years ago
parent
commit
cb9594c75a

+ 17 - 0
src/custom/modules/clipModel/Clip.js

@@ -391,4 +391,21 @@ export {Clip}
 
 /* 
 裁剪点云时,2D界面显示全部平面图,按楼层切换显示。 
+
+
+
+
+
+
+所有点云下载后点云所带的本地坐标都是场景显示的local坐标,这样才能看起来一样。
+且为了使之和坐标页面对应,坐标页面的本地坐标也是local,而非mesh_local.
+
+
+
+
+
+
+
+
+
  */

+ 4 - 0
src/custom/modules/clipping/Clipping.js

@@ -395,4 +395,8 @@ export class Clipping extends THREE.EventDispatcher{ //实时剪裁
 
 
 
+
+
+
+
  */

+ 10 - 6
src/custom/modules/panos/Images360.js

@@ -664,16 +664,21 @@ export class Images360 extends THREE.EventDispatcher{
         //Potree.Log('hope flyToPano: '+toPano.pano.id, toPano.pano.position.toArray() )
         
         
-        if(this.latestToPano && this.latestToPano != toPano && this.latestToPano.pano != this.currentPano){//还在飞//如果旧的toPano只是旋转镜头,就直接取消旧的
+         
+        
+        if(this.latestToPano && this.latestToPano != toPano && (//还在飞
+            this.latestToPano.pano != this.currentPano || !this.isAtPano())){//如果旧的toPano只在pano旋转镜头,就直接取消旧的,继续执行 
             return done(false) 
         }
          
-        //Potree.Log('flyToPano: '+toPano.pano.id, toPano.pano.position.toArray()  /* this.latestToPano && this.latestToPano.pano.id */ )
-          
         if(this.currentPano == toPano.pano && this.isAtPano() && !toPano.target && !toPano.quaternion  ){
+            //已在该pano
             this.dispatchEvent({type:'flyToPano', toPano})
             return done(true);
         }
+        //Potree.Log('flyToPano: '+toPano.pano.id, toPano.pano.position.toArray()  /* this.latestToPano && this.latestToPano.pano.id */ )
+         
+        
         
         let target = toPano.target   
         let config = Potree.config.displayMode[Potree.settings.displayMode]
@@ -839,7 +844,7 @@ export class Images360 extends THREE.EventDispatcher{
                     //console.log('progress_', progress_, 'delta',delta , 'progress', progress/*, 'currentSpeed', currentSpeed, */  )                    
                     
                     if (progress > loadNextProgress && toPano.easeName == 'linearTween' && currentSpeed){// 减速. 如果仅旋转就不停止 
-                        //console.log('减速', currentSpeed)
+                        //console.log('减速', /* currentSpeed , */progress_ )
                         toPano.easeName = 'easeOutSine'
                         let restDis = (1 - progress) * dis
                         toPano.duration = (Math.PI / 2 * restDis) / currentSpeed // 这样能保证初始速度为currentSpeed
@@ -851,8 +856,7 @@ export class Images360 extends THREE.EventDispatcher{
                     onUpdate(progress)
                 },
                 
-                callback:()=>{ 
-                    
+                callback:()=>{  
                     if(!config.atPano.pointUsePanoTex){ 
                         viewer.scene.pointclouds.forEach(e=>{
                             e.material.stopProjectedPanos()

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

@@ -436,7 +436,7 @@ export class ctrlPolygon extends THREE.Object3D {
                 viewer.dispatchEvent({type:'reticule_forbit', v:false})
                 //console.log('reticule_forbit',false)
             }
-            this.dragMarker(e) //触屏时必须先更新下点 
+            this.isNew && this.dragMarker(e) //isNew触屏点击时必须先更新下点,因为指尖不在屏幕上时没更新。但对已经创建的marker点击时不应该更新
             
         }
          

+ 2 - 1
src/navigation/InputHandlerNew.js

@@ -410,7 +410,8 @@ export class InputHandler extends THREE.EventDispatcher {
       
         
         //if(isTouch || !Potree.settings.intersectWhenHover ){ 
-        if(!this.dragViewport.view.isFlying() &&  Potree.settings.intersectWhenHover && Potree.settings.editType != 'pano'  ){//漫游点编辑如果拖拽前getIntersect旋转会延迟
+        if(isTouch || !this.dragViewport.view.isFlying() &&  Potree.settings.intersectWhenHover && Potree.settings.editType != 'pano'  ){//漫游点编辑如果拖拽前getIntersect旋转会延迟
+            //isTouch必须更新 否则是旧的 
             this.hoveredElements = this.getHoveredElements();
             let dontIntersect = false
             this.intersect = this.getIntersect(viewport,null,null,dontIntersect) //更新intersect,避免在没有mousemove但flyToPano后intersect未更新。

+ 4 - 3
src/viewer/ExtendView.js

@@ -182,7 +182,7 @@ class ExtendView extends View {
         this.cancelFlying()
         let posWaitDone,  rotWaitDone , dir
         
-        let posDone = ()=>{
+        let posDone = ()=>{ 
             rotWaitDone || done()
             posWaitDone = false
         }
@@ -202,8 +202,9 @@ class ExtendView extends View {
         
         let done = ()=>{ //一定要旋转和位移都结束了才能执行
             
-            let f = ()=>{
-                info.callback && info.callback()     
+            let f = ()=>{ 
+                this.position.copy(endPosition)  //因为延时1后control的update会导致位置改变
+                info.callback && info.callback()  
                 this.dispatchEvent('flyingDone')  
             }
             if(info.duration){