Hi! Thanks for this wonderful alternative to OrbitControls π
I have a view that's being used for scientific visualization, and it's helpful to let the user toggle between orthographic and perspective. As a result, I've created two cameras and two CameraControls instances, and I'm alternating between them. However, this isn't working perfectly.
If I dispose()
the first one when adding the second one, when I reattach it, it no longer receives mouse events, and if I recreate it, it seems to have lost some of its internal state.
If I don't dispose()
the first when adding the second, the mouse events intended for the second are sent to both.
I could maybe add an undispose()
or reattach()
method.
Alternatively, I could try to recreate the controls each time the camera changes, though I'm not sure how to correctly transfer the internal state from the old controls.
Do you have a suggestion for this? Thanks!