diff --git a/src/main/mesh.js b/src/main/mesh.js index 1e623775..e666c854 100644 --- a/src/main/mesh.js +++ b/src/main/mesh.js @@ -154,11 +154,7 @@ broker.subscribe('space_init', data => { let q = new THREE.Quaternion(); // find intersecting point, look "up" on Z and rotate to face that q.setFromUnitVectors(int.face.normal, new THREE.Vector3(0,0,-1)); - group.qrotate(q); - // let e = new THREE.Euler().setFromQuaternion(q); - // let n = int.face.normal; - // console.log({n,q,e}); - // group.rotation(e.x, e.y, e.z); + group.qrotation(q); group.floor(); } else { api.selection.toggle(model.group); diff --git a/src/mesh/api.js b/src/mesh/api.js index 64de6f40..148a1018 100644 --- a/src/mesh/api.js +++ b/src/mesh/api.js @@ -249,9 +249,6 @@ let util = mesh.util = { box.expandByObject( o instanceof mesh.object ? o.object() : o ); - // box.union(new THREE.Box3().setFromObject( - // o instanceof mesh.object ? o.object() : o - // )); } } else if (object) { box.setFromObject( diff --git a/src/mesh/object.js b/src/mesh/object.js index 955cb12a..09ee4684 100644 --- a/src/mesh/object.js +++ b/src/mesh/object.js @@ -73,7 +73,6 @@ mesh.object = class MeshObject { return this; } - // use with caution. frames of reference interfere. rotation() { let rot = this.object().rotation; if (arguments.length === 0) { @@ -85,8 +84,7 @@ mesh.object = class MeshObject { return this; } - // use with caution. frames of reference interfere. - qrotate(quaternion) { + qrotation(quaternion) { this.object().setRotationFromQuaternion(quaternion); this.updateBoundsBox(); moto.Space.update();