3 ms·
How does performance compare to CSS transitions? Every animation framework I've tried has been a failure by comparison, even though CSS transitions are a nightm
by untog 10y ago
How does performance compare to CSS transitions? Every animation framework I've tried has been a failure by comparison, even though CSS transitions are a nightmare to work with a lot of the time.
(an aside, but boasting about a 12KB minified size for an animation library baffles me. That's huge!)
- derekperkins 10y agoIf you look at Greensock, the lite version is 28kb and the max version is 113kb, so it's all relative.
- tannerlinsley 10y agoYou will almost always get better performance with CSS, unless you are using something like GSAP (which actually beats hardware accelerated CSS in some case). There are times though when you need animation to be dynamic, and React can be difficult to use with the more established framework agnostic animation libraries. This is also still a very young project, so I'm sure there are optimizations to be had. At some point, you will always be able to overwhelm the browser thread with too much to animate in under 16ms. I hope to get as close to (or under) that target as React and RAF will allow. As for the size, you may be right compared to standalone animation libraries. I am mostly comparing it to something like React-Motion (30kb I think?)