notecss
Physics in CSS!
I transferred a JS physics function into CSS thanks to sqrt()
, exp()
, sin()
, cos()
and @property
.
:root {
--mass: 1;
--stiffness: 100;
--damping: 5;
--start-velocity: 0;
}
Check it out on Codepen. Change the properties and see a different animation.