diff --git a/scripts/components.js b/scripts/components.js index 76f5a1b..ced6fda 100644 --- a/scripts/components.js +++ b/scripts/components.js @@ -164,6 +164,12 @@ sprite.inputs.kp1 = function() { this.pos = this.dimensions().scale([-1,-1]); }; Object.seal(sprite); var SpriteAnim = { + make(path) { + if (path.ext() === 'gif') + return SpriteAnim.gif(path); + else if (Resources.is_image(path)) + return SpriteAnim.strip(path); + }, gif(path) { var anim = {}; anim.frames = [];