google / marzipano

A 360° media viewer for the modern web.
http://www.marzipano.net
Apache License 2.0
1.99k stars 995 forks source link

Enable hotspot buttons scaling #425

Open creanovogit opened 2 years ago

creanovogit commented 2 years ago

Hello is there any way to enable hotspot buttons scaling? I want the hotspot buttons to become larger/smaller when I zoom in/out.

Regards, Rafiq

jordyno commented 2 years ago

Hi, you probably mean embedded hotspots, see more here reference

creanovogit commented 2 years ago

I tried the embedded hotspots. They become larger/smaller when I zoom in/out, but they gets 'stretched' depending how we rotate image.

jordyno commented 2 years ago

ok, now I understand. This is beyond standard Marzipano functionality. You have to write a listener for viewChange of the Viewer and then update scale of the hotspot manually as the FOV changes.

creanovogit commented 2 years ago

how can i get the current FOV?

jordyno commented 2 years ago

_viewer._currentScene._view._fov

creanovogit commented 2 years ago

Thanks