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

What is Framer? Join the Community
Return to index
Chris Clark
Posted Oct 19 - Read on Facebook

Anybody know what units Velocity is measured in? The docs say that scroll.velocity is in pixels per second, and doesn't specify draggable.velocity, but the numbers don't seem large enough. Pixels per frame, maybe?


Koen Bok

It actually really should be in px/s. In this line it divides the traveled distance in pixels by the time it did it in. It smoothens it out over the last 0.1s by default.

Chris Clark

ah: velocity = (current - first) / time, but looks like time is in milliseconds, so it's pixel per millisecond(?)

Koen Bok

Deng yes I think you are right. I was just confused because we try to keep all times in Framer in seconds, but timestamps are not. I should probably fix that!

Read the entire post on Facebook