From c7ab04aeacf32f436fcf17ff79f2ac9c30caa017 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Thu, 25 Mar 2021 21:04:28 -0400 Subject: [PATCH] bump rev 2.8.D5 --- package.json | 2 +- src/kiri.js | 2 +- src/license.js | 2 +- src/mode/cam/client.js | 10 +++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 37f2f9d0..e0df0b0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-apps", - "version": "2.8.4D", + "version": "2.8.5D", "description": "grid.space 3d slice & modeling tools", "author": "Stewart Allen ", "license": "MIT", diff --git a/src/kiri.js b/src/kiri.js index 0930d039..39761634 100644 --- a/src/kiri.js +++ b/src/kiri.js @@ -6,7 +6,7 @@ if (!self.kiri) { self.kiri = { - beta: 2804, + beta: 2805, driver: {}, // driver modules loader: [] // module loading: array of functions }; diff --git a/src/license.js b/src/license.js index 2d8589e4..724f8f5c 100644 --- a/src/license.js +++ b/src/license.js @@ -3,7 +3,7 @@ let terms = { COPYRIGHT: "Copyright (C) Stewart Allen - All Rights Reserved", LICENSE: "See the license.md file included with the source distribution", - VERSION: "2.8.D4" + VERSION: "2.8.D5" }; if (typeof(module) === 'object') { diff --git a/src/mode/cam/client.js b/src/mode/cam/client.js index b4f262b8..e522ddae 100644 --- a/src/mode/cam/client.js +++ b/src/mode/cam/client.js @@ -760,10 +760,14 @@ let { id, pos, rot } = rec; let tab = widget.tabs[id]; let e = new THREE.Euler().setFromQuaternion(rot); - // let dv = (e._z - (Math.PI - e._z)); e._z = Math.PI - e._z; - rec.rot = new THREE.Quaternion().setFromEuler(e); - // let m4 = new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,0,dv)); + let { _x, _y, _z, _w } = rec.rot; + let or = new THREE.Quaternion(_x, _y, _z, _w); + let nr = new THREE.Quaternion().setFromEuler(e); + let ra = or.angleTo(nr); + console.log({or, nr, ra}); + rec.rot = nr; + // let m4 = new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,0,e._z)); // tab.box.geometry.applyMatrix4(m4); tab.box.position.x = pos.x = -pos.x; });