Here’s a lightweight Blender like orientation gizmo for Three.js, it work in tandem with a slightly modified version of THREE.OrbitControls, it follow the orbit controls rotations changes and you can change the camera angle by dragging the gizmo or select an axis by clicking on it.
Glad this helped you out and I really appreciate you taking the time to express that, thank you
At first I was heading the same way as you did, either creating a new WebGLRenderer or using scissors or WebGLRenderTarget, then I found this three-orientation-gizmo, simply drawing on a small 2D canvas, no new scene, camera or renderer and no interference with the main scene in term of logic or resources. coupled it with THREE.OrbitControls add some new events and it worked well
Is it adaptable to any Control class or the Orbit one only?
It work only with OrbitControls and I think it’s for the better, since we already have a class to control the camera why not just use its functionalities, keeping the code lighter.
on the last Blender release they added back axis letters too (-X, -Y, -Z) for clarity…
Should be easy to implement, I’ll update the repo, add an npm package and a cdn with a jsfiddle and codepen examples, fix the click/drag events conflict and improve it for touch controls, can’t tell exactly when maybe a week or two, right now I’m working on a project that is taking all my time and a bit of my sanity along the way , I’ll keep you in touch when it’s done.
I’m not happy with the axis transition animation, for now I’m just updating the camera position, I’ll try to animate the position and the rotation together, can’t promise anything, euler angles, quaternions and gimbal lock are over my head, they still give me dizziness (if any one here can help it would be nice )
It could be really cool to be able to use keyboard to move/rot/scale precisely (like in Blender: G X 50)