flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Friction and selectedAttraction behave differently on different refresh rates

Open timocouckuyt opened this issue 2 years ago • 2 comments

Hi guys,

First of all, you've done an amazing job with this library. Really outstanding, compared to others out there. We couldn't be more grateful!

One small "issue" we've noticed is that, with the same friction and selectedAttraction values (example below uses selectedAttraction: 0.022 and friction: 0.28), a carousel behaves differently viewing them on screens with different refresh rates.

2 video's to clearly illustrate this, below:

  • Behaviour at 60Hz: https://devplus.be/downloads/flickity/60Hz.mov
  • Behaviour at 144Hz: https://devplus.be/downloads/flickity/144Hz.mov

Since the animations are based on physics rather than time based transitions, it seems that on higher refresh rate screens, animations are much faster.

This may seem like a minor issue, but it's concerning for us because it creates different behaviours on the same browsers, same devices but with different screens. Where time based transitions are more controllable.

timocouckuyt avatar Aug 27 '21 11:08 timocouckuyt

Yup, this is how Flickity was coded. It's based off framerate not actual time.

Add a 👍 reaction to this issue if you would like to see Flickity get time-based physics rather than frame-based. Do not add +1 comments — They will be deleted.

desandro avatar Dec 21 '21 20:12 desandro

Would this also cover #46 ?

Hlsgs avatar Dec 21 '21 21:12 Hlsgs