mpetroff / pannellum

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

Is it possible to recreat the kuula movement? #1036

Open azevedomt82 opened 3 years ago

azevedomt82 commented 3 years ago

The pannellum movement is a bit "stiff" compared with kuula, where the movement has more fluidity. Is there a way to recreate something like that?

Sorry, I know that this is more of a "feature request" than an issue...

mpetroff commented 3 years ago

You'd have to modify the onDocumentMouseMove function in pannellum.js to use a different algorithm. The current behavior is intentional, with the goal of having the drag location follow the pointer / finger. Personally, I find the Kuula movement "rubber bandy" and unresponsive, so it's a matter of taste. That's not to say that the current algorithm can't be improved, such as by potentially adding some degree of smoothing, but that the Kuula algorithm seems to have a different goal.