Popmotion / popmotion

Simple animation libraries for delightful user interfaces
https://popmotion.io
20k stars 663 forks source link

Inertia-like friction based animation. #915

Open jankaifer opened 3 years ago

jankaifer commented 3 years ago

[Feature Request]

I'm trying to create custom scroll view with inertia. It works but I'm trying to tweak its feel.

I wan't to achieve these things:

  1. Start velocity should be equal to the end of use dragging velocity (otherwise it's weird).
  2. Be able to tweak the friction of my animation (how quickly will it stop).

I was able to do achieve something similar with power: 0.1 and timeConstant: 150. For example, if I don't change power it feels really weird.

It might be a bit less intuitive to create snapping with this approach, but IMO it will be easier to use. And most importantly all parameter variants will look somewhat realistic.