Can AnimationNode exposed finished like promises?

If I understand the spec correctly, currently, only when a whole sequence of animation nodes are finished, will authors be notified, through the finished promise exposed by the player. However, it’s impossible to get notified when each individual animation node inside that sequence is finished animating. Since animation nodes have the knowledge of its staring and ending time, I wonder if it makes sense expose these time points? For example, start (fired at 0 local time), end (fired and end of the active interval) and also iterationStart (fired at start of each iteration), iterationEnd ((fired at end of each iteration). These events should potentially bubble to the player, but not sure how that should be done if only promises are used.

I’d like to get notified of these time points because I want to manipulate the class name of each animation node’s element after they done animating. For example, an element is slowly moved to the middle of the viewport by manipulating its transform property, but once it’s done moving, I want to change its class name so it actually use flex layout to stay in the middle, to eliminate the space occupied by its original box (in turn to eliminate the scroll bar for example), which basically use different styles to imitate the forwards fill mode,

Is this the right thing to do? If so, should animation nodes expose their time points to make it possible?

Received on Friday, 6 February 2015 03:42:57 UTC