camera-controls
camera-controls copied to clipboard
Transition updateCameraUp
Is your feature request related to a problem? Please describe.
Unlike most other modifications of the camera, updateCameraUp
and applyCameraUp
don't offer a variable to transition. As a result, updates to camera.up
are immediate, rather than transitioned. It would be nicer to have a transition.
Describe the solution you'd like
The API chagnes to updateCameraUp(enableTransition?)
and applyCameraUp(enableTransition?)
, much like rotate
and dolly
and all the rest.
Describe alternatives you've considered
I've animated this manually, but it's a pain, and the end didn't quite work right, though that may be due to the data I was working with.
Additional context
No response
The function applyCameraUp triggers several calculations, as seen here: https://github.com/yomotsu/camera-controls/blob/cf392955edfec75e45c6a2dc36f53891319f3918/src/CameraControls.ts#L2475-L2491
I am concerned that making it animatable within the tick function might lead to performance issues. Typically, changing the camera's up direction is uncommon in regular usage, so it might be more efficient to handle this as a separate function and call it only when necessary.
What are your thoughts on this approach?