浏览代码

fix: reverse

xzw 8 月之前
父节点
当前提交
8e60cfdfbc
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/sdk/cover/index.js

+ 5 - 1
src/sdk/cover/index.js

@@ -1676,8 +1676,12 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                     path.addOrRemovePoint && path.setAddOrRemPoint(false)
                   
                     if(Potree.settings.pathSmooth){  
-                        let curve = path.curve.clone();
+                        let curve = path.curve.clone(); 
                             curve.points.forEach(e=>e.z += 2)
+                            
+                        if(path.reverse) curve.points.reverse()      
+                            
+                            
                         //let geoPoints = path.geoPoints.map(e=> e.clone().add(new THREE.Vector3(0,0,2)) )//height
                         let duration = path.totalLength / 3  
                         //let tangentDt =  path.totalLength * 0.0001