Inspired by CSS3 Animations in real life.
Working with web tech is mostly using a tool to get something done, animations are something that isn’t that simple to deal with but there are tools out there that can make your life simpler.
We can use CSS, DOM, sprites and? Obviously something no-one heard of, SVG animations in the browser!
Obviously we have an acronym SMIL, pronounced as smile, which is Synchronized Multimedia Integration Language.
Basically we can add a nested
<animate> svg element within the one we want to animate, like this.
set what we want to animate
and now the center attribute will go from the value 0 to 100 in 5 seconds and cycle indefinitely.
Wow that was easy, time to level up
this is a little tricky, we did not se the center of rotation so it is assumed to be (0,0) the top left corner, lets fix this.
now the center of rotation is (512,512), the center of
And this is the effect we can get with SMIL, the example is forked from Edoardo Odorico’s one.
What is missing is the CSS animation and we could pack the three files into one.
These are the images with animation included