Skip to content

Instantly share code, notes, and snippets.

@swkidd
swkidd / animation.js
Created April 24, 2020 04:34 — forked from threedaymonk/animation.js
Alternative animation implementation for beta.jisho.org, using an easing function to accelerate towards the middle of a stroke, and decelerate at the end
var Animation = Class(function Animation() {});
Animation.mixin(Canvas);
Animation.prototype.extend(Event.Listener);
Animation.prototype.extend({
reset: function() {
this.relativePosition = 0;
this.maxPosition = this.totalFrames - 1;