Created
March 12, 2014 20:38
-
-
Save matsko/9515786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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