On 2015/07/16 16:50, Kristopher Giesing wrote:
I was thinking that something like this is probably the best solution.
(I've had some nightmarish experiences with z-order, so I'm all for
avoiding that as a paradigm.)
Out of curiosity, do we even need the notion of sequence numbers? Or can
animations be regarded as belonging to a list or array structure that
can be enumerated and manipulated with familiar push/pop/insert/append
APIs? (Apologies if this has been discussed before.)
I think sequence numbers shouldn't be exposed by the API. They're just a
product of how the model is described.
The sequence numbers are, in effect, describing a kind of global array.
The proposed compositeAfter/Before are basically doing operations on
that global array. I don't know if it makes sense to expose the array
whole-sale, however, since normally you don't access the whole thing.
For example, you can call document.timeline.getAnimations() but that
will only give you part of the "global sequence number array"
(specifically it will be filtered by animations referring to
document.timeline as their timeline) spliced together with CSS
animations and transitions which don't use sequence numbers.
Element.getAnimations() gives you a different subset.
If you've got a specific idea in mind, however, of how this should work,
please let us know!
Brian