Accumulation of to‑animation

Another area of uncertainty regarding to‑animation is how a repeated to‑animation should behave when accumulate it set to sum. Should the animation build like other animations or repeat its normal to‑animation?

Here is a simple example:

<svg xmlns="http://www.w3.org/2000/svg">
  <circle fill="red" stroke="black" r="20">
    <animateTransform attributeName="transform" type="scale"
      to="2" dur="0.75" repeatCount="4" accumulate="sum"
      fill="freeze"/>
  </circle>
</svg>

And in your browser:

In Batik the to‑animation repeats, and in Opera it just keeps growing. So which is right?

It’s not spelled out in the spec, but fortunately this has been addressed in SMIL3 which prefers the behaviour of Batik, i.e. the accumulate attribute has no effect. Cumulative animation of to‑animation is not defined.

Comments

Olaf

I think, the behaviour is already implied by the definition in the old SMIL animation recommendation.

http://www.w3.org/TR/2001/REC-smil-animation-20010904/#FromToByAndAdditive

Because it starts with the underlying value and ends with the to-value, it does the same, if it is repeated, there is no choice to do something different, even if an author note accumulate sum, because for each repetition it starts again with the underlying value und ends with the to-value. But of course, in later SMIL versions this is much clearer, but the additions seem to be derived directly from implied consequences of the original definition. Therefore I test this already for animations within SVG1.1 depending on the old SMIL animation recommendation.

Brian

Yes, you’re right. I noticed this just this morning actually. Thanks for pointing that out! I will take a look at your test cases. Thanks again!

Brian

Just for the record, this is in SMILANIM 3.3.1 where it says:

Cumulative animation is not defined for “to animation”.

Leave a reply

Most markdown like **bold** and _italic_ is supported.

Never shown. Only used for looking up your gravatar.

Optional
https://