Re: [web-animations] Relative Animation is taking over the world

On Fri, Apr 24, 2015 at 6:54 AM, Shane Stephens <> wrote:

>> 4. Subtraction:
>> I propose the spec require a definition of subtraction for properties in
>> 4.1.2. Procedures for animating properties. I also propose the spec require
>> the definition of zero for properties. This is of course for the Relative
>> Animation pattern. Take for example these minor extensions to permit
>> additive animation of mesh transforms (in Obj-C):
>> If there ever is a mesh type for the web, figuring out how to “FLIP” it
>> (as Paul Lewis now calls it) will be impossible.
> Subtraction is addition of the additive inverse of a value. From the code
> you've linked, it looks like the additive inverse of a mesh type is
> trivially calculable (it's just the additive inverse of each component).
Actually, I think I would prefer a function to get the inverse of a value
over a function to subtract. The inverse of a matrix is not so easy to

I have code that produces additive animations from absolute values (from 2
to 10), and converts to relative values (from -8 to 0). It is not so easy
to automate as it requires lots of parsing. A way to inverse values would
be wonderful.

Another use case for a function to inverse values is when animating a tree
menu. I want compensation animations when an element changes sort order in
the hierarchy, from one parent node to another below it. This means copying
animations from the parent container and applying them to the newly
inserted sub-element. The new animation's timing is a copy of the previous
(perhaps in progress), but the from and to values of the effect have to be
inverted. In other words if the container is animating from -8 to 0, the
inverted animation animates from 8 to 0. But that involves more awkward

A function to invert values would make many relative animation techniques
much easier to accomplish in web-animations.

Received on Friday, 1 May 2015 20:27:06 UTC