I’ve been in the process of migrating my old codebase across to viewer API 2.0.
I noticed that several functions such as the ability to zoom into objects via the objectIDs is now a protected method. And I couldn’t quite find whereabouts to interact with the cameraHandler in the new API.
We’ve updated the migration guide for anybody who wants to update existing apps to API 2.0. It specifically doesn’t go into details, just advises about what changed and how. It might have missed some things, and if that’s the case, do let us know!
As always, your feedback is valuable and we’re here if you have other questions
I believe that would replicate the original implementation using the controls library events. However there is another built in way of getting this sort of information from the camera controller by using CameraControllerEvents emitted by the CameraController extension directly. So you would have something like this
Ultimately, both approaches do the same thing, the difference being that CameraControllerEvents are emitted by listening on multiple internal controller events (like ‘transitionStart’) so in theory they should be more reliable when in come to camera motion singnaling.
Generally speaking, using the controls from the camera controller extension directly would be discouraged if you ask me, since it’s a specific implementation that will be replaced in the future with possibly no backwards compatibility