const PROPERTY_TYPE={NUMBER:1,VECTOR2:2,COLOR:3},SHAPES={RECT:1,ELLIPSE:2},TRANS_TYPE={LINEAR:1,QUAD:2,CUBIC:3,QUART:4,QUINT:5,SINE:6,EXPONENTIAL:7,CIRCULAR:8,ELASTIC:9,BACK:10,BOUNCE:11},EASE_TYPE={IN:1,OUT:2,IN_OUT:3},RENDER_MODES={P2D:1,WEBGL:2},STYLE={DEFAULT_FONT_SIZE:20,DEFAULT_STYLE:{"font-family":"Lato"}},Easings={Linear:{ease:function(t,e,i,s){return e+i*t/s}},Quad:{easeIn:function(t,e,i,s){return i*(t/=s)*t+e},easeOut:function(t,e,i,s){return-i*(t/=s)*(t-2)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e}},Cubic:{easeIn:function(t,e,i,s){return i*(t/=s)*t*t+e},easeOut:function(t,e,i,s){return i*((t=t/s-1)*t*t+1)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}},Quart:{easeIn:function(t,e,i,s){return i*(t/=s)*t*t*t+e},easeOut:function(t,e,i,s){return-i*((t=t/s-1)*t*t*t-1)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t*t*t+e:-i/2*((t-=2)*t*t*t-2)+e}},Quint:{easeIn:function(t,e,i,s){return i*(t/=s)*t*t*t*t+e},easeOut:function(t,e,i,s){return i*((t=t/s-1)*t*t*t*t+1)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e}},Sine:{easeIn:function(t,e,i,s){return-i*Math.cos(t/s*(Math.PI/2))+i+e},easeOut:function(t,e,i,s){return i*Math.sin(t/s*(Math.PI/2))+e},easeInOut:function(t,e,i,s){return-i/2*(Math.cos(Math.PI*t/s)-1)+e}},Expo:{easeIn:function(t,e,i,s){return 0==t?e:i*Math.pow(2,10*(t/s-1))+e},easeOut:function(t,e,i,s){return t==s?e+i:i*(1-Math.pow(2,-10*t/s))+e},easeInOut:function(t,e,i,s){return 0==t?e:t==s?e+i:(t/=s/2)<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e}},Circ:{easeIn:function(t,e,i,s){return-i*(Math.sqrt(1-(t/=s)*t)-1)+e},easeOut:function(t,e,i,s){return i*Math.sqrt(1-(t=t/s-1)*t)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+e:i/2*(Math.sqrt(1-(t-=2)*t)+1)+e}},Elastic:{easeIn:function(t,e,i,s){var n=1.70158,a=0,h=i;return 0==t?e:1==(t/=s)?e+i:(a=a||.3*s,n=h{i.P5Image=t})},getTextureByName:function(e){for(let t=0;t{i.P5Font=t})},getFontByName:function(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=this.getCurrentFrameTime()&&(this.frame=(this.frame+1)%this.getCurrentNumFrames(),this.timeSinceLastFrame=0)),this.P5Image=this.getCurrentFrame(),this._update(e);for(let t=0;t