UNPKG

@infinityfx/lively

Version:

Feature complete, lightweight react animation library.

3 lines (2 loc) 699 B
class i{constructor(i,t,s,n={}){this.commit=!0,this.onfinish=null,this.composite=s.composite,s.composite="combine"===s.composite?"accumulate":"replace",this.animation=i.element.animate(t,s),this.dynamic=n,this.track=i,this.animation.onfinish=this.finish.bind(this)}finish(){var i;try{this.commit&&this.animation.commitStyles()}catch(i){}this.animation.cancel(),null===(i=this.onfinish)||void 0===i||i.call(this)}step(i){var t,s;const n=(null===(t=this.animation.effect)||void 0===t?void 0:t.getComputedTiming().progress)||0;for(const t in this.dynamic)this.track.apply(t,null===(s=this.dynamic[t])||void 0===s?void 0:s.call(this.track,n,i))}}export{i as default}; //# sourceMappingURL=action.js.map