GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

03Friction decay — a disc that integrates each frame to a stop

In the rAF loop, measure dt, integrate angle += angularVelocity·dt and angularVelocity *= friction^dt — fast right after the flick, slowing on an exponential curve. When velocity drops under a threshold the loop ends and the resting angle is fixed.

Best forPhysics-feel interactions, games

requestAnimationFrameperformance.now
Friction decay — a disc that integrates each frame to a stop
Open in a new tab

03 Friction decay — a disc that integrates each frame to a stop — Measured area 9.394% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · Spin Wheel: 9 Canvas Roulettes, Flick to Stop

The post this demo lives in

Spin Wheel: 9 Canvas Roulettes, Flick to Stop - preview of all 9 demosSpin Wheel: 9 Canvas Roulettes, Flick to StopIt spins exactly as hard as you flick it. Angular velocity is integrated, friction decays it, and the sector under the p See all demos in this post

If you like this effect - similar demos