/*! animatesprite - v0.2.1 - 2015-05-13 * Copyright (c) 2015 Blai Pratdesaba; Licensed MIT */ !function(){"use strict";!function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=a-1?g.loop===!0?(i=0,n()):(g.complete(),f=!1):n(),i};if(void 0===g.animations)i++,l(i),a.call(this,g.totalFrames);else{if(void 0===d)for(var b in g.animations){d=g.animations[b];break}c=d[i],l(c),i++,a.call(this,d.length)}},n=function(){var a=1e3/(g.fps+1);17>a?window.requestAnimationFrame(m):e=setTimeout(m,a)},o=function(){clearTimeout(e),f=!1},p=function(){o(),n()},q=function(){i=0,n()},r=function(a){f||(a?(o(),g.animations[a]!==d&&(i=0,d=g.animations[a]),n()):n(),f=!0)},s=function(){a.jquery&&(a=a[0]),k(function(a,b){if(g.columns=Math.round(a/g.width),void 0===g.totalFrames){var c=Math.round(b/g.height);g.totalFrames=g.columns*c}g.autoplay&&(n(),f=!0)})},t=function(a){return a&&(o(),l(a)),c};return j(),h(b),s(),{stop:o,resume:p,restart:q,settings:h,play:r,frame:t}};"function"==typeof define&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?module.exports=a:"undefined"!=typeof this&&(this.AnimateSprite=a)}(this);