This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Florian Pnn
Posted Dec 09 - Read on Facebook

Hello everyone!
Working on a scroll view that respond to different velocities and trigger different animation based on it (stickToBottom, goToMid, goToTop).

Is it possible to "hijack" the momentum to smooth the transition from momentum to animation?

4 Comments

Jorn van Dijk

Heya Florian, can you paste the URL here so we can see how you’re trying to work it out?

Florian Pnn

http://share.framerjs.com/bn7ihq18j3vh/

Here is what I try to achieve, you can see the transition from the momentum to the animation seems laggy. I wonder if there is a way to smooth that up.

Eelco Lempsink

You can try using scroll.velocity to get a vector of the movement and use that to configure your animation. Here’s a small example that stops the scrollview with an animation, if you drag faster it will go a bit further before stopping: http://share.framerjs.com/64slgiuig1bc/

Florian Pnn

Oh I didn't thought about using spring in there!
Is there a logic behind scroll component velocity and spring velocity that I can use in there?

Read the entire post on Facebook