metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.53k stars 603 forks source link

Friction and selectedAttraction behave differently on different refresh rates #1175

Open timocouckuyt opened 3 years ago

timocouckuyt commented 3 years ago

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:

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.

desandro commented 2 years ago

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.

Hlsgs commented 2 years ago

Would this also cover #46 ?