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

What is Framer? Join the Community
Return to index
Sergey Voronov
Posted Jan 19 - Read on Facebook

anyone managed to calculate where the layer will stop scrolling animation, but within onscrollend event, taking into account layer's velocity?

4 Comments

Koen Bok

For this we need more deterministic animators. The physics ones only calculate one step per frame, but they need to be able to calculate all upfront at once. We are working on this.

Sergey Voronov

Thanx, i thought someone did magic already:)

Jordan Robert Dobson

Yeah that's how I was doing it to... couldn't you call that in an accelerated way by taking the fps and then just calculating the position (within a threshold) as if frames were passing by?

I imagine that's how people have plotted points to show curves for springs and the such.

Holger Kuehnle

Here is an example of how to do this: https://framer.cloud/VYdoT/ It calculates the distance you would scroll and at what speed. Note that this essentially reimplements the Draggable behavior. But as a bonus, you get snap point scrolling as well.

Read the entire post on Facebook