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

Javascript Image Swap works in 2.2 but not > 2.2

TheWaterbug opened this issue · comments

Further to my goal of rolling my own "poor man's VR," I want to allow the user to switch panoramas via a OnChange function. I lifted some code from StackExchange, and the resulting page works as expected: https://www.kan.org/Eastvale/Pano/PannellumSwitcherWorking.html [edit: code tags and links don't appear to be rendering properly, but the code is inline on the linked pages] But if I update the call to load pannellum from https://cdn.pannellum.org/2.2/pannellum.js to https://cdn.pannellum.org/2.3/pannellum.js, https://cdn.pannellum.org/2.4/pannellum.js, or https://cdn.pannellum.org/2.5/pannellum.js, then the panoramas do not render: https://www.kan.org/Eastvale/Pano/PannellumSwitcherNotWorking.html. I don't see anything in the change logs that immediately suggest why that code should stop working, but I'm not very good at this. 🤣 I want to use the latest pannellum for the orientation support. Thanks!

Ugh. Formatting appears to be broken, and I can't figure out why. Sorry for the poor readability.

Your broken example doesn't specify the size of the lefteye element, but your working example does. Your issue has nothing to do with the change in Pannellum version; it's because you used different code to make the comparison. The element size needs to be specified.

And I also had some incorrect paths to pannellum. Sorry to waste everyone's time.