Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to loop SVG animation sequence?

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.

like image 373
serg Avatar asked Sep 02 '10 18:09

serg


People also ask

How do you repeat an animation in SVG?

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

Is animation possible in SVG?

SVG supports the ability to change vector graphics over time, to create animated effects. SVG content can be animated in the following ways: Using SVG's animation elements [svg-animation]. SVG document fragments can describe time-based modifications to the document's elements.


1 Answers

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"/> 
like image 118
serg Avatar answered Sep 22 '22 09:09

serg