ISSUE-2306: SMIL calcMode="linear" and animation of integers is underspecified

smil-integer

SMIL calcMode="linear" and animation of integers is underspecified

State:
RAISED
Product:
SVG 2
Raised by:
Jonathan Watt
Opened on:
2010-02-18
Description:
Here's the comment that I added to one of Mozilla's tests:

<!-- Our implementation strategy for animating integers with
calcMode="linear" is to use round(), with the slight twist that we
round "to the NEXT value" when the current time puts us exactly midway
between two integer values. (This is so that the result of midpoint
rounding does not depend on whether we're animating up to a higher
value or animating down to a lower value.) Note that one of the quirks
of using round() is that the start and end values of any integer
range only receive half as much time as any intermediary values. This
is as you would expect mathematically, but it's probably unexpected
for most users!

We could try to avoid this round() quirk by coming up with a better
implementation strategy for calcMode="linear", but animation of the
few integer attributes in SVG 1.1 is extremely unlikely (so this
issue is very low priority), and it's actually difficult to find a
better strategy that doesn't have its own undesirable quirks.

One alternative could be to divide the time evenly amoungst each
integer. (I.e. it would be similar to calcMode="discrete", except it
would also visit all the intermediary values, not just the start and
end values). The issue with this approach is that for a simple "to"
animation the animation wouldn't actually seem to change anything until
interpolation reaches the second integer value. This could be avoided
by skipping the initial value and distributing the time between the
other values, but then in the case of a "from-to" animation where the
from value is different to the underlying attribute value, the
animation would seem to skip the first value. Not that the same sort of
problem exists at the other end of the simple duration, where it will
reach the final integer value before the end of the simple duration.
This could be avoided by only setting the final value right at the end
of the simple duration and distributing the time between evenly
between the other values, but then the final value will only be seen if
fill="freeze".

There are many other problems with other implementation strategies. The
more you think about them, add the complexity of 'values', 'by' etc,
and think of cases where they behave strangely (e.g. animating between
just two adjacent integers, up or down, etc.), the more ugly it gets.
It's really not worth it for SVG 1.1. Maybe if you could use SMIL for
'font-size' or something even more likely to be animated it would be.
-->
Related Actions Items:
No related actions
Related emails:
  1. Re: ISSUE-2306 (smil-integer): SMIL calcMode='linear' and animation of integers is underspecified [SVG Core 2.0] (from ed@opera.com on 2010-02-22)
  2. ISSUE-2306 (smil-integer): SMIL calcMode='linear' and animation of integers is underspecified [SVG Core 2.0] (from sysbot+tracker@w3.org on 2010-02-18)

Related notes:

No additional notes.

Display change log ATOM feed


Dirk Schulze <dschulze@adobe.com>, Chair, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2306.html,v 1.1 2020/01/17 13:21:06 carcone Exp $