How to loop SVG animation sequence?

serg picture serg · Sep 2, 2010 · Viewed 32.1k times · Source

I have sequence of animationTransform:

<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="30" begin="0s" dur="0.4s" fill="freeze"/>
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="30" to="0" begin="0.4s" dur="0.4s" fill="freeze"/>

If it possible to loop this sequence without using script?

I can set individual animation to loop by using repeatCount="indefinite" by I want to loop the whole sequence in order.

Answer

serg picture serg · Sep 2, 2010

Figured it out already. Solution for those who are interested:

<animateTransform id="anim1" attributeName="transform" attributeType="XML" type="rotate" from="0" to="30" begin="0s; anim2.end" dur="0.4s" fill="freeze"/>
<animateTransform id="anim2" attributeName="transform" attributeType="XML" type="rotate" from="30" to="0" begin="anim1.end" dur="0.4s" fill="freeze"/>