A 50 Lines-of-Code JavaScript Animation Framework: Say Hello to Émile
November 7th, 2009 by Thomas Fuchs, 13 comments »At my talk at Fronteers, I introduced Émile, a JavaScript animation framework, that’s framework-agnostic, and just takes up about 50 lines of code. With Gzipping, and minification, it’s well under 1k in size. Consider it experimental, but most things you’d ever need are supported, supporting IE6 and up, and modern web browsers (Firefox, Safari, Chrome), of course.
Here’s the source, MIT-licensed and waiting for your patches and comments!
And here’s a Presentation (4MB PDF) about the details of the implementation, also a good starting point if you want to write your own animation framework. Enjoy!
Tweet This Post
Digg This Post
Share on Facebook









looks good! I’ll have to play around with it sometime soon. Seems very good for when you don’t need alot of effects stuff.
Hi Thomas, some code from emile got me curious.
Why would you want to split a “static” string at run time in order to get a list of properties ? Is the only reason to save some bytes, as you don’t clutter the code with ’ and , ?
Readability is improved, but do you consider the cost of parsing this string as insignificant ?
Just curious
I really like the elegance/performance combo of the emile.js code. Thx for sharing
@Tim: the split() is only executed once, so there’s no performance hit, but at the same time it makes the code more readable, shorter and more maintainable
[...] am sitting next to Thomas Fuchs at JSConf.EU and he just posted about his new library agnostic CSS animation framework called Émile (named after Émile Cohl, an early [...]
I just wrote a comment on Ajaxian when I realised that I should’ve commented here :/
I won’t duplicate the comment here, but just point out that the hex color parsing bit is broken (the c variable is only declared but never defined) – but the line will only get executed if a browser actually returns a hex color through currentStyle/getComputedStyle… Which probably hasn’t happened in any of your tests. I couldn’t say whether this would ever happen and in what cases – maybe the line is completely redundant? Hooray – then Émile would even shorter!
[...] Thomas Fuchs introduced his new project Émile at JSConf.EU. It is a JavaScript animation framework, that’s framework-agnostic, and just takes up about 50 lines of code. [...]
I have to try it out, the selectors I like it.
bounce also can be approximated with: (python)
def bounce(t):
return 1.0 – (1-t)*(1-t)*abs(cos(4*pi*t));
very good presentation, thank you.
Thanks you very much! I had time looking for a presentation with js Animations.
Уважаемые читатели. С Рождеством христовым хочется вас поздравить. Админу сайта отдельное пожелание-побольше читателей на блоге, креативных интересных статей и всего всего всего
Хороший сайт. Так держать!!!
[...] am sitting next to Thomas Fuchs at JSConf.EU and he just posted about his new library agnostic CSS animation framework called Émile (named after Émile Cohl, an early [...]
[...] If you like, grab the slides and the code at my previous post. [...]