xzw 1 bulan lalu
induk
melakukan
361e38b892
1 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 5 3
      src/sdk/cover/index.js

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

@@ -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) {