Closed dkirkby closed 1 year ago
The pannellum library assumes a fixed horizontal FoV independent of the window width, which leads to a jarring change in FoV per pixel when rotating between portrait and landscape on mobile devices.
The solution I implemented is to generate the initial view with a fixed FoV of 0.09 deg / pixel, then track changes to the FoV initiated by the user (via zoom in/out), and preserve the current pixel FoV during window resize events.
So far I have only tested this in a chrome browser on a Mac.
Tested with firefox on android rotating the phone as well as firefox on a laptop resizing the window and the new behavior feels consistent when changing aspect ratio (either through rotation or resizing) and has less distortion in vertical aspect ratios.
This seems to be working well - closing now.
From @kfanning:
Next steps: