xzw преди 4 години
родител
ревизия
6a7d308655
променени са 2 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 4 3
      js/edit.js
  2. 3 0
      js/main_2020_edit.js

+ 4 - 3
js/edit.js

@@ -152,7 +152,8 @@ EditTools.prototype.saveAll = function () {
               y: dom.hotMesh.position.y,
               z: dom.hotMesh.position.z
             },
-            quaternion : hot.isSprite ? hot.quaternion.toObject() : dom.hotMesh.quaternion.toObject()  
+            //quaternion : hot.isSprite ? hot.quaternion: dom.hotMesh.quaternion.toObject()  
+            rotation : hot.isSprite ?  new THREE.Euler().setFromQuaternion(hot.quaternion).toObject() : dom.hotMesh.rotation.toObject() 
             , 
             isSprite :  hot.isSprite ? 1 : 0,
             infoAttribute: dom.infoAttribute 
@@ -161,10 +162,10 @@ EditTools.prototype.saveAll = function () {
         if(hot.visiblePanos) hots[sid].visiblePanos = hot.visiblePanos
 
 
-        delete dom.infoAttribute.rotation;
+       
         delete dom.infoAttribute.position;
         delete dom.infoAttribute.quaternion;
-         
+        delete dom.infoAttribute.rotation; 
          
     })
 

+ 3 - 0
js/main_2020_edit.js

@@ -38677,6 +38677,9 @@ function o(a, s, l) {
                 this.onChangeCallback(),
                 this
             },
+            toObject: function() {//xzw
+                return {x:this.x,y:this.y,z:this.z}
+            },
             setFromRotationMatrix: function(e, t, i) {
                 var n = Ci.Math.clamp
                   , r = e.elements