|
|
@@ -998,12 +998,14 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
return new THREE.Euler(Math.PI / 2, 0, 0)
|
|
|
} else return new THREE.Euler(0, 0, 0)
|
|
|
}
|
|
|
- let getDefaultRotation = () => {
|
|
|
+ let getDefaultRotation = (type) => {
|
|
|
+ let rotation
|
|
|
if(model.lonLatRot){
|
|
|
- return model.lonLatRot
|
|
|
+ rotation = model.lonLatRot
|
|
|
}else{
|
|
|
- return getBaseRotation()
|
|
|
+ rotation = getBaseRotation()
|
|
|
}
|
|
|
+ return type == 'getEuler' ? rotation : rotation.toObject() //给前端用
|
|
|
}
|
|
|
|
|
|
if (props.rotation) {
|
|
|
@@ -1269,8 +1271,9 @@ 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 ){
|
|
|
- model && model.position.copy(model.lonLatPos)
|
|
|
+ let initialPos = model.lonLatPos // || model.initialPosition
|
|
|
+ if(pos.x == 0 && pos.y == 0 && pos.z == 0 && initialPos ){
|
|
|
+ model && model.position.copy(initialPos)
|
|
|
console.log('changePosition 使用经纬度坐标', model.name )
|
|
|
}else{
|
|
|
model && model.position.copy(pos)
|
|
|
@@ -2139,7 +2142,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
|
|
|
if(Potree.settings.pathSmooth){
|
|
|
let curve = path.curve.clone();
|
|
|
- curve.points.forEach(e=>e.z += 2)
|
|
|
+ curve.points.forEach(e=>{e.add(path.edge.position), e.z += 2})
|
|
|
|
|
|
if(path.reverse) curve.points.reverse()
|
|
|
|
|
|
@@ -2683,7 +2686,9 @@ function load4dkkMedias(model){//加载四维看看的一些媒体物品
|
|
|
if(json.surveillances){//监控
|
|
|
|
|
|
surveillancePath = Potree.Common.joinUrl(Potree.settings.urls.getPrefix(8,{}), surveillancePath )
|
|
|
-
|
|
|
+ model.props.raw.surveillancePath = surveillancePath //2025.11.17add
|
|
|
+
|
|
|
+
|
|
|
Potree.loadFile(surveillancePath + '?m='+Date.now(),null,(monitorJson)=>{
|
|
|
//console.log(model.name, 'surveillance', monitorJson)
|
|
|
monitorJson.forEach((e)=>{
|