Skip to content

Instantly share code, notes, and snippets.

@matsko
Created March 12, 2014 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsko/9515786 to your computer and use it in GitHub Desktop.
Save matsko/9515786 to your computer and use it in GitHub Desktop.
class MyAnimation extends LoopedAnimation {
const DURATION = 1000;
final dom.Element element;
final AnimationLoop animationLoop;
MyAnimation(this.element, this.animationLoop) {
animationLoop.play(this);
}
bool update(num timeCount) {
//render the animation styling here...
//element.style.prop = '...';
//whether to stop the animation or not
return timeCount < DURATION;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment