farminf / pannellum-react

React Component for Pannellum (open source panorama viewer for the web)
MIT License
112 stars 81 forks source link

a way to disable animation and timeout #121

Closed fuddl closed 1 year ago

fuddl commented 1 year ago

currently, whenever pitch and yaw are changed, a denounce happens followed by an easing animation, that pans to the new direction. Can I instead change pitch and yaw instantaneously?

fuddl commented 1 year ago

I figured out how to do it:

useEffect(() => {
    panorama.current.panorama.setYaw(yaw, 0)
    panorama.current.panorama.setPitch(pitch, 0)
  },
  [yaw, pitch]
);