I'm looking to create a web animation with the new spec and polyfill. The animation I am trying to create is have an element move 1024 px to right right and fade out. And then that is it, it doesn't reset, the animation just ends.
I'm trying to accomplish this with the new Web Animations Spec. Here is the polyfill on github: https://github.com/web-animations/web-animations-js
Here is the code that I am using for the animation, but it just fades the item out and then resets to full opacity. It doesn't move. And I don't want it to reset when it is done.
var player = document.timeline.play(new Animation(document.querySelector('.right'), [ {opacity: "1.0", left:0}, {opacity: "0.0", left:"1024px"}], {direction: "forwards", duration: 1000}));
Here is a JS Fiddle with that code and the polyfill: http://jsfiddle.net/Wz8A8/
Update: It seems as if it is only taking one property to animate at a time. Any ideas on how I can do more than one property? Also is it possible to just do ' to ' the end values instead of starting from a keyframe, just ending at a keyframe?