Animation §

An Animation is like a video player.
Play, pause, seek, speed it up, slowmo and even play it in reverse.

Associated with a Timeline, which it uses like a clock, to figure out what time it is.

You can give an Animation "effects", for example KeyframeEffect.

new Animation(effect, timeline);

Arguments §

§ effect

An effect is an item it plays in its' timing hierarchy.

You can use KeyframeEffect, GroupEffect and SequenceEffect.

§ timeline

The source of time it uses.

Could be a clock, random values, scroll position or even input from a touch gesture

Currently Level 1 Web Animations only specifies the global clock, document.timeline, but in the future we should be able to have custom timelines.

var effect = KeyframeEffect || GroupEffect || SequenceEffect || null; var timeline = AnimationTimeline || null;