fix cnc default tools, tab rotations

This commit is contained in:
Stewart Allen 2025-02-16 12:31:45 -05:00
commit 6097557608
4 changed files with 12 additions and 15 deletions

View file

@ -640,8 +640,9 @@ class Widget {
for (let tab of this.anno.tab) {
const { pos, dim, rot } = tab;
const box = new THREE.BoxGeometry(dim.x, dim.y, dim.z).toNonIndexed();
const quat = new THREE.Quaternion(rot.x, rot.y, rot.z, rot.w);
box.applyMatrix4(
new THREE.Matrix4().makeRotationFromQuaternion(rot)
new THREE.Matrix4().makeRotationFromQuaternion(quat)
);
box.translate(pos.x, pos.y, pos.z);
vert.appendAll(box.attributes.position.array);