Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating animations with Clojurescript Om

Tags:

I've been looking around for how to create animations in Om, I've tried creating a RaphaelJs component with moderate success. I get the animation I want, but for some reason Om renders multiple instances of the SVG element.

enter image description here

Looking at the animation example in the Om github folder uses setInterval to change the values you want to animate, which is less than ideal.

I'm aware of the CSSTransitionGroup addon, but it looks like you can only flip between preset animations defined in the CSS, you can't decide to do something like rendering a path and having a shape following it with randomised timings. Please feel free to correct me if you can dynamically define animations using it.

Does anyone have any good examples of performing simple animations? Just translating or rotating simple shapes would give me an idea of how to start tackling it from there.