class FontRes{constructor(t="",e=null){this.name=t,this.P5Font=e}}class SpriteAnimation{constructor(t="default",e,i,s,n,a){this.name=t,this.fullP5Image=e,this.rows=i,this.columns=s,this.indices=n,this.numFrames=this.indices.length,this.frameTime=1/a,this.frames=[];for(let t=0;t{i.P5Image=t})},getTextureByName:function(e){for(let t=0;t{i.P5Font=t})},getFontByName:function(e){for(let t=0;t=this.getCurrentFrameTime()&&(this.frame=(this.frame+1)%this.getCurrentNumFrames(),this.timeSinceLastFrame=0)),this.P5Image=this.getCurrentFrame(),this._update(e);for(let t=0;t=this.tweenData.length||(this.tweenData[t].playing=!0)}stopAll(){for(let t=0;t=this.tweenData.length||(this.tweenData[t].playing=!1)}resumeAll(){for(let t=0;t=this.tweenData.length||(this.tweenData[t].playing=!0)}resetAll(){this.doneTweens=0,this.done=!1;for(let t=0;t=this.tweenData.length||(this.doneTweens--,this.done=!1,this.tweenData[t].t=0,this.tweenData[t].done=!1)}removeAll(){for(;0=this.tweenData.length||this.tweenData.splice(t,1)}seekAll(e){if(!(e<0))for(let t=0;t=this.tweenData.length||(this.tweenData[t].t=min(e,this.tweenData[t].duration))}allDone(){this.emitSignal("tweenAllCompleted"),this.done=!0}initSignals(){this.addSignal("tweenAllCompleted"),this.addSignal("tweenCompleted"),this.addSignal("tweenStarted"),this._initSignals()}update(e){this.done||this.doneTweens!=this.tweenData.length||this.allDone();for(let t=0;t