ソースを参照

fix: getDefaultPosition

xzw 11 時間 前
コミット
da0778fbb4
3 ファイル変更3475 行追加3722 行削除
  1. 3468 3717
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 6 4
      src/sdk/cover/index.js

ファイルの差分が大きいため隠しています
+ 3468 - 3717
public/lib/potree/potree.js


ファイルの差分が大きいため隠しています
+ 1 - 1
public/lib/potree/potree.js.map


+ 6 - 4
src/sdk/cover/index.js

@@ -1142,7 +1142,9 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                 bus,
                 model,
                 getDefaultRotation,
-
+                getDefaultPosition(){
+                    return model.lonLatPos || new THREE.Vector3(0,0, model.zOnGround || 0)
+                },
                 supportPano() {  //是否支持全景图
                     return model?.panos?.length > 0
                 },
@@ -1247,12 +1249,12 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                 }, 
                 changePosition(pos) {//校准取消时执行
                     //console.log('changePosition', model.name, pos.x, pos.y, pos.z) 
-                    if(pos.x == 0 && pos.y == 0 && pos.z == 0 && model.lonLatPos ){
+                    /* if(pos.x == 0 && pos.y == 0 && pos.z == 0 && model.lonLatPos ){
                         model && model.position.copy(model.lonLatPos)
                         console.log('changePosition 使用经纬度坐标', model.name )
-                    }else{
+                    }else{ */
                         model && model.position.copy(pos)
-                    }
+                    //}
                     model.dispatchEvent({ type: 'position_changed'/* , byControl:true */})
                 },
                 changeRotation(rot) {//校准取消时执行