Hi,
First of all, thanks for your great work with pannellum.
I try to enhance the function _loadScene_, that it would zoom in when i click on a hotspot in the actual scene. It fades from one scene to the other. But it would be awesome if it would zoom to the Hotspot, before the new one loads.
function loadScene(sceneId, targetPitch, targetYaw, targetHfov, fadeDone) {...}
if i add setHfov(10) in the the "Set up fade if specified"-block, then it jumps directly to Hfov 10, not animated.
How can i make it animated.
If i click on a "Scene-Hotspot", it should zoom in and fade to the new scene.
The "set up fade" block just captures a image of the current view and uses that to fade, so it can't be animated.
To zoom in on the hot spot, you need to use clickHandlerFunc hot spot parameter and define a custom handler function. This handler function can call the lookAt API method to zoom in to the hot spot location; set a callback function when doing so that calls loadScene to load the new scene when the zoom animation finishes. None of this requires editing the existing library code.
I tried the same solution, but it there any way to do the zoom and transition simultaneously.
The above solution it is happening in a sequential way ---- like clicking on the hot spot -> zooming the current scene with animation for some time interval and after that the next seen it loading.
@amitmobitoss No, not really. The transition is implemented by rendering a frame of the old panorama view to an image, switching the WebGL renderer to the new panorama, and then fading out the image of the old panorama view. Since the old panorama is no longer being rendered when the view transitions, zooming in on it when transitioning isn't possible with Pannellum's standard tools. In theory, you could zoom in on the static image of the old panorama, but doing so presents other issues, particularly in regard to resolution.