11 ms·
Now that css is getting a linear() function we can get all kinds of spring/bounce/elastic animations that we couldn't before (hence why we resorted to JS). http
by sktrdie 3y ago
Now that css is getting a linear() function we can get all kinds of spring/bounce/elastic animations that we couldn't before (hence why we resorted to JS). https://twitter.com/JoshWComeau/status/1660684634340962305 https://twitter.com/JoshWComeau/status/1660684634340962305
Once this lands stable in all browser we can say goodbye to JS library animations (rightly so since they block the main thread).
- FireInsight 3y agoWeb Animations API isn't blocking IIRC. https://motion.dev/ https://motion.dev/ uses it.
- sktrdie 3y agoRight but for spring animations you still have to run the calculations on the main thread. [1] 1. https://webcache.googleusercontent.com/search?q=cache:Pa8-Oa5mIXYJ:https://dev.to/virtualkirill/how-to-create-a-spring-animation-with-web-animation-api-n1i&cd=14&hl=en&ct=clnk&gl=nl https://webcache.googleusercontent.com/search?q=cache:Pa8-Oa...
- SirHound 3y agoYeah but these can be precalculated in the perceptual window as per Framer Motion and Motion One, and then handed off to WAAPI. Which is still needed for actual spring physicals vs the facsimile of linear() (which might often be enough!)