mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.28k stars 724 forks source link

How to make use of 'hotSpotDebug' values? #532

Closed nobutsta closed 6 years ago

nobutsta commented 6 years ago

Hi, I want to use some of those values that logged in the console when the function 'hotSpotDebug' was 'true'. There're 5 values : Pitch, Yaw , Center Pitch, Center Yaw and HFOV. I want to use Center Pitch and Center Yaw.

How to just extract the desired value? Is there something like 'hotSpotDebug[center_pitch]'?

Please help. Best,

nobutsta commented 6 years ago

I got an answer, thanks for watching!

$('#panorama').on('mouseup', function(event) { $('#pitch').val(viewer.getPitch()); $('#yaw').val(viewer.getYaw()); });