You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
}
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: