3 ms·
Dont forget that CSS based animation is a declarative based animation framework while Velocity.js is using imperative code to animate (while the calls look decl
by TeeWEE 12y ago
Dont forget that CSS based animation is a declarative based animation framework while Velocity.js is using imperative code to animate (while the calls look declarative, the code in the framework has to be bundled with your js).
The advantage of the declarative approach, is that browser can improve the CSS animations in every browser update. Also, in theory, browsers could improve CSS animation in such a way that is is always faster than velocity.js.
You could for example make a CSS-animation to velocity.js compiler. Browser do this compilation (not to velicity.js but to native code/operations) already. Thats why it surprises me that velocity.js is saying its faster than pure CSS animations.
Can somebody enlighten me on why this is the case?
- purpleturtle 12y agoYep, I authored an article on CSS vs. JavaScript performance here: http://davidwalsh.name/css-js-animation http://davidwalsh.name/css-js-animation