0

I am trying to rotate my SVG image along its axis, which I can successfully do with the following code:

<animateTransform attributeName="transform"
                  type="rotate"
                  from="120 262.5 125"
                  to="0 262.5 125"
                  begin="2s"
                  dur="2s"
                  repeatCount="indefinite"
 />

My question is whether or not there is a way to deal the restart of the animation by a second or two. With repeatCount set to indefinite, it immediately restarts it.

Thanks in advance!

UPDATE

I have tried the code given below, but it didn't quite work the way I needed it to. It needs to rotate around the svg's central axis, but pause for about a second before restarting. Any ideas?

FINAL UPDATE

On the off chance that anyone sees this in the future searching for this issue, I'll provide what I was able to do to get it to work. By adding an id, changing the begin time and the repeatCount, I was successfully able to get a repetitive rotation with a delay in between.

Here's the code:

<animateTransform id="rotation" attributeName="transform"
                  type="rotate"
                  from="120 262.5 125"
                  to="0 262.5 125"
                  begin="2+rotation.end+2"
                  dur="2s"
                  repeatCount=1
 />
jldavis76
  • 812
  • 2
  • 15
  • 42
  • Does this answer your question? [SVG animation delay on each repetition](https://stackoverflow.com/questions/31690880/svg-animation-delay-on-each-repetition) – Mahozad May 08 '22 at 15:51

1 Answers1

0

Try following code

<animateTransform attributeName="transform"
    type="rotate"
    from="120 262.5 125"
    to="0 262.5 125"
    begin="0"
    dur="2s"
    repeatCount="indefinite"
    keyTimes="0;0.75;1" 
     values="0 54.2 43.3 ; 0 54.2 43.3 ; 360 54.2 43.3"
 />

here animation begin is specified with relative to animation end, in this way your animation will always wait for your specified time(here 4 sec) and start playing again ...

Nilesh Mahajan
  • 3,506
  • 21
  • 34
  • That does not quite fix it. It does create a little bit of a delay, but the rotation is all out of whack. Maybe if I played with the numbers a little bit... – jldavis76 May 01 '15 at 18:27