I noticed that some of my text elements appeared upside down in threejs compared to my CAD software. I've tried to review the code, and I believe that line 334 in index.js always produces positive angles, when half of them should be negative.
if (entity.directionVector) {
var dv = entity.directionVector
textEnt.rotation.z = new THREE.Vector3(1, 0, 0).angleTo(new THREE.Vector3(dv.x, dv.y, dv.z))
}
I believe a simple sign multiplication with the Y-component would do the trick.
if (entity.directionVector) {
var dv = entity.directionVector
textEnt.rotation.z = new THREE.Vector3(1, 0, 0).angleTo(new THREE.Vector3(dv.x, dv.y, dv.z)) * Math.sign(dv.y)
}
I noticed that some of my text elements appeared upside down in threejs compared to my CAD software. I've tried to review the code, and I believe that line 334 in index.js always produces positive angles, when half of them should be negative.
Line 334 in index.js
I believe a simple sign multiplication with the Y-component would do the trick.