mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.

Home Page:https://pannellum.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avoid MC Escher effect

erdmann040 opened this issue · comments

Hi,

If I use the example for the multiresolution panorama on the desktop in a maximised browser window, everything works as desired, but if the height and width of the viewport differ greatly (as with most smartphones) and you then scroll back, you get a very distorted image that reminds me of the paintings by the Dutch artist MC Escher.

pannellum org_documentation_examples_multiresolution_(Samsung Galaxy S8+)

There must be a way to prevent this and let the stage look more natural, right?

Which configuration parameter lets me limit the scrolling back and can I perhaps set this parameter in relation to the viewport?

Thanks in advance for your help

There must be a way to prevent this and let the stage look more natural, right?

You can limit the maximum horizontal field of view with the maxHfov configuration parameter, or programmatically using the setHfovBounds API method. Panoramas are inherently a horizontal format, so the unnatural part is the absurdly tall aspect ratio (>2:1) you're showing.

Thank you for your answer! You have helped me a lot.