|
|
@@ -1002,12 +1002,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) {
|