4 ms·
Maybe this is a dumb question, but why not use SVG? It's scriptable and supported on modern browsers.
by colanderman 14y ago
Maybe this is a dumb question, but why not use SVG? It's scriptable and supported on modern browsers.
- dragongraphics 14y agoNot a dumb question - only reason was because I wanted an excuse to play around with css animations and see how powerful they are in their current state. SVG would probably be much more robust as a solution (as would canvas have been) - I think the demo shows more than anything that CSS3 animations need slightly more reliable support across modern browsers before they are a viable choice for doing some really nice things with them.
- smickie 14y agoI might be able to answer this. Animating SVG is tricky, groups is a particularly issues because each element inside a group has to be animated as opposed to just animating the parent group tag (which causes a lot of issues with rotations in particular, you have to break out the trigonometry in javascript).
- jarek-foksa 14y agoI disagree, <g> element can be animated with JavaScript as easily as e.g. <div>. You just change the value of transform attribute. Rotations can be handled easily once you understand how matrixes work.