Skip to content

Instantly share code, notes, and snippets.

@jaz303
Created April 27, 2015 18:29
Show Gist options
  • Save jaz303/d27c668287f69c78ee7b to your computer and use it in GitHub Desktop.
Save jaz303/d27c668287f69c78ee7b to your computer and use it in GitHub Desktop.
function Animation() {
this.startTime = null;
this.endTime = null;
this.duration = null;
this.ease = null;
this.apply = null;
var self = this;
this._resolve = null;
this._promise = new Promise(function(resolve) {
self._resolve = resolve;
});
}
Animation.prototype.then = function(fn) {
return this._promise.then(fn);
}
Animation.prototype.complete = function() {
this._resolve();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment