diff --git a/.gitignore b/.gitignore index a547bf3..251ce6d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist dist-ssr *.local diff --git a/dist/assets/index-Dp2PfoCH.js b/dist/assets/index-Dp2PfoCH.js new file mode 100644 index 0000000..140ddc6 --- /dev/null +++ b/dist/assets/index-Dp2PfoCH.js @@ -0,0 +1 @@ +var e,t,r,i,n,s,o,a,h,l,u,d,c,f,p,g,m,w,A,v,y,V,x,E,b,S=Object.defineProperty,R=(e,t,r)=>(((e,t,r)=>{t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const r of e)if("childList"===r.type)for(const e of r.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const M={pc:'This is my PC. I work mostly in JavaScript/TypeScript these days.\n I\'ve made a couple of games in that language. I also like Golang and Python. Anyway regardless of the language, I just like programming.\n Here is my Github!',"cs-degree":"This is my CS degree. I hanged it on the wall because I'm proud of it. It was a very theoretical degree but I think it gave me a good foundation.","sofa-table":'That\'s my sofa. I like to relax here and watch YouTube. \n I also make game programming tutorials on YouTube. Go sub to my channel! (If you like the content)\n You\'ll learn how I built this portfolio you\'re currently playing through!',tv:'That\'s my TV. I\'ve been watching tech youtubers a lot recently like :\n Theprimeagen, Theo - t3.gg,\n PirateSoftware (sometimes) and Melkey!',bed:"This where I sleep. Great ideas comes when I'm lying on my bed. When an idea strikes, I often have to write it down or else I won't be able to sleep because my mental energy is consumed by it.",resume:'This is my desk and on it is my resume. Check it out?\n Contact me at jslegend@protonmail.com if you have any interesting job opportunities!',projects:'Info about this portfolio : It\'s made with the Kaboom.js library which is a library for making games in JavaScript.\n Text is rendered with HTML/CSS. So the textbox you\'re currently reading is not rendered within canvas. Learn more about how to use\n Kaboom.js by watching some of my tutorials here.',library:"There are a lot of programming books on my shelves. There is even one in french (I also speak french btw).\n I probably only read one of them. Who else compulsively buys technical books without ever finishing them?",exit:"If you want to exit JSLegendDev's portfolio, just close the tab."};var T=Object.defineProperty,P=(e,t)=>T(e,"name",{value:t,configurable:!0}),B=(()=>{for(var e=new Uint8Array(128),t=0;t<64;t++)e[t<26?t+65:t<52?t+71:t<62?t-4:4*t-205]=t;return t=>{for(var r=t.length,i=new Uint8Array(3*(r-("="==t[r-1])-("="==t[r-2]))/4|0),n=0,s=0;n>4,i[s++]=a<<4|h>>2,i[s++]=h<<6|l}return i}})();function I(e){return e*Math.PI/180}function k(e){return 180*e/Math.PI}function F(e,t,r){return t>r?F(e,r,t):Math.min(Math.max(e,t),r)}function D(e,t,r){if("number"==typeof e&&"number"==typeof t)return e+(t-e)*r;if(e instanceof N&&t instanceof N)return e.lerp(t,r);if(e instanceof O&&t instanceof O)return e.lerp(t,r);throw new Error(`Bad value for lerp(): ${e}, ${t}. Only number, Vec2 and Color is supported.`)}function C(e,t,r,i,n){return i+(e-t)/(r-t)*(n-i)}function U(e,t,r,i,n){return F(C(e,t,r,i,n),i,n)}P(I,"deg2rad"),P(k,"rad2deg"),P(F,"clamp"),P(D,"lerp"),P(C,"map"),P(U,"mapc");var N=(P(e=class{constructor(e=0,t=e){R(this,"x",0),R(this,"y",0),this.x=e,this.y=t}static fromAngle(t){let r=I(t);return new e(Math.cos(r),Math.sin(r))}clone(){return new e(this.x,this.y)}add(...t){let r=L(...t);return new e(this.x+r.x,this.y+r.y)}sub(...t){let r=L(...t);return new e(this.x-r.x,this.y-r.y)}scale(...t){let r=L(...t);return new e(this.x*r.x,this.y*r.y)}dist(...e){let t=L(...e);return this.sub(t).len()}sdist(...e){let t=L(...e);return this.sub(t).slen()}len(){return Math.sqrt(this.dot(this))}slen(){return this.dot(this)}unit(){let t=this.len();return 0===t?new e(0):this.scale(1/t)}normal(){return new e(this.y,-this.x)}reflect(e){return this.sub(e.scale(2*this.dot(e)))}project(e){return e.scale(e.dot(this)/e.len())}reject(e){return this.sub(this.project(e))}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}angle(...e){let t=L(...e);return k(Math.atan2(this.y-t.y,this.x-t.x))}angleBetween(...e){let t=L(...e);return k(Math.atan2(this.cross(t),this.dot(t)))}lerp(t,r){return new e(D(this.x,t.x,r),D(this.y,t.y,r))}slerp(e,t){let r=this.dot(e),i=this.cross(e),n=Math.atan2(i,r);return this.scale(Math.sin((1-t)*n)).add(e.scale(Math.sin(t*n))).scale(1/i)}isZero(){return 0===this.x&&0===this.y}toFixed(t){return new e(Number(this.x.toFixed(t)),Number(this.y.toFixed(t)))}transform(e){return e.multVec2(this)}eq(e){return this.x===e.x&&this.y===e.y}bbox(){return new de(this,0,0)}toString(){return`vec2(${this.x.toFixed(2)}, ${this.y.toFixed(2)})`}},"Vec2"),R(e,"LEFT",new e(-1,0)),R(e,"RIGHT",new e(1,0)),R(e,"UP",new e(0,-1)),R(e,"DOWN",new e(0,1)),e);function L(...e){if(1===e.length){if(e[0]instanceof N)return new N(e[0].x,e[0].y);if(Array.isArray(e[0])&&2===e[0].length)return new N(...e[0])}return new N(...e)}P(L,"vec2");var O=(t=class{constructor(e,t,r){R(this,"r",255),R(this,"g",255),R(this,"b",255),this.r=F(e,0,255),this.g=F(t,0,255),this.b=F(r,0,255)}static fromArray(e){return new t(e[0],e[1],e[2])}static fromHex(e){if("number"==typeof e)return new t(e>>16&255,e>>8&255,e>>0&255);if("string"==typeof e){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return new t(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16))}throw new Error("Invalid hex color format")}static fromHSL(e,r,i){if(0==r)return new t(255*i,255*i,255*i);let n=P(((e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e)),"hue2rgb"),s=i<.5?i*(1+r):i+r-i*r,o=2*i-s,a=n(o,s,e+1/3),h=n(o,s,e),l=n(o,s,e-1/3);return new t(Math.round(255*a),Math.round(255*h),Math.round(255*l))}clone(){return new t(this.r,this.g,this.b)}lighten(e){return new t(this.r+e,this.g+e,this.b+e)}darken(e){return this.lighten(-e)}invert(){return new t(255-this.r,255-this.g,255-this.b)}mult(e){return new t(this.r*e.r/255,this.g*e.g/255,this.b*e.b/255)}lerp(e,r){return new t(D(this.r,e.r,r),D(this.g,e.g,r),D(this.b,e.b,r))}toHSL(){let e=this.r/255,t=this.g/255,r=this.b/255,i=Math.max(e,t,r),n=Math.min(e,t,r),s=(i+n)/2,o=s,a=s;if(i==n)s=o=0;else{let h=i-n;switch(o=a>.5?h/(2-i-n):h/(i+n),i){case e:s=(t-r)/h+(tO.fromHSL(e,t,r)),"hsl2rgb"),H=(P(r=class{constructor(e,t,r,i){R(this,"x",0),R(this,"y",0),R(this,"w",1),R(this,"h",1),this.x=e,this.y=t,this.w=r,this.h=i}scale(e){return new r(this.x+this.w*e.x,this.y+this.h*e.y,this.w*e.w,this.h*e.h)}pos(){return new N(this.x,this.y)}clone(){return new r(this.x,this.y,this.w,this.h)}eq(e){return this.x===e.x&&this.y===e.y&&this.w===e.w&&this.h===e.h}toString(){return`quad(${this.x}, ${this.y}, ${this.w}, ${this.h})`}},"Quad"),r);function K(e,t,r,i){return new H(e,t,r,i)}P(K,"quad");var Y=(P(i=class{constructor(e){R(this,"m",[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),e&&(this.m=e)}static translate(e){return new i([1,0,0,0,0,1,0,0,0,0,1,0,e.x,e.y,0,1])}static scale(e){return new i([e.x,0,0,0,0,e.y,0,0,0,0,1,0,0,0,0,1])}static rotateX(e){e=I(-e);let t=Math.cos(e),r=Math.sin(e);return new i([1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1])}static rotateY(e){e=I(-e);let t=Math.cos(e),r=Math.sin(e);return new i([t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1])}static rotateZ(e){e=I(-e);let t=Math.cos(e),r=Math.sin(e);return new i([t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1])}translate(e){return this.m[12]+=this.m[0]*e.x+this.m[4]*e.y,this.m[13]+=this.m[1]*e.x+this.m[5]*e.y,this.m[14]+=this.m[2]*e.x+this.m[6]*e.y,this.m[15]+=this.m[3]*e.x+this.m[7]*e.y,this}scale(e){return this.m[0]*=e.x,this.m[4]*=e.y,this.m[1]*=e.x,this.m[5]*=e.y,this.m[2]*=e.x,this.m[6]*=e.y,this.m[3]*=e.x,this.m[7]*=e.y,this}rotate(e){e=I(-e);let t=Math.cos(e),r=Math.sin(e),i=this.m[0],n=this.m[1],s=this.m[4],o=this.m[5];return this.m[0]=i*t+n*r,this.m[1]=-i*r+n*t,this.m[4]=s*t+o*r,this.m[5]=-s*r+o*t,this}mult(e){let t=[];for(let r=0;r<4;r++)for(let i=0;i<4;i++)t[4*r+i]=this.m[0+i]*e.m[4*r+0]+this.m[4+i]*e.m[4*r+1]+this.m[8+i]*e.m[4*r+2]+this.m[12+i]*e.m[4*r+3];return new i(t)}multVec2(e){return new N(e.x*this.m[0]+e.y*this.m[4]+this.m[12],e.x*this.m[1]+e.y*this.m[5]+this.m[13])}getTranslation(){return new N(this.m[12],this.m[13])}getScale(){if(0!=this.m[0]||0!=this.m[1]){let e=this.m[0]*this.m[5]-this.m[1]*this.m[4],t=Math.sqrt(this.m[0]*this.m[0]+this.m[1]*this.m[1]);return new N(t,e/t)}if(0!=this.m[4]||0!=this.m[5]){let e=this.m[0]*this.m[5]-this.m[1]*this.m[4],t=Math.sqrt(this.m[4]*this.m[4]+this.m[5]*this.m[5]);return new N(e/t,t)}return new N(0,0)}getRotation(){if(0!=this.m[0]||0!=this.m[1]){let e=Math.sqrt(this.m[0]*this.m[0]+this.m[1]*this.m[1]);return k(this.m[1]>0?Math.acos(this.m[0]/e):-Math.acos(this.m[0]/e))}if(0!=this.m[4]||0!=this.m[5]){let e=Math.sqrt(this.m[4]*this.m[4]+this.m[5]*this.m[5]);return k(Math.PI/2-(this.m[5]>0?Math.acos(-this.m[4]/e):-Math.acos(this.m[4]/e)))}return 0}getSkew(){if(0!=this.m[0]||0!=this.m[1]){let e=Math.sqrt(this.m[0]*this.m[0]+this.m[1]*this.m[1]);return new N(Math.atan(this.m[0]*this.m[4]+this.m[1]*this.m[5])/(e*e),0)}if(0!=this.m[4]||0!=this.m[5]){let e=Math.sqrt(this.m[4]*this.m[4]+this.m[5]*this.m[5]);return new N(0,Math.atan(this.m[0]*this.m[4]+this.m[1]*this.m[5])/(e*e))}return new N(0,0)}invert(){let e=[],t=this.m[10]*this.m[15]-this.m[14]*this.m[11],r=this.m[9]*this.m[15]-this.m[13]*this.m[11],n=this.m[9]*this.m[14]-this.m[13]*this.m[10],s=this.m[8]*this.m[15]-this.m[12]*this.m[11],o=this.m[8]*this.m[14]-this.m[12]*this.m[10],a=this.m[8]*this.m[13]-this.m[12]*this.m[9],h=this.m[6]*this.m[15]-this.m[14]*this.m[7],l=this.m[5]*this.m[15]-this.m[13]*this.m[7],u=this.m[5]*this.m[14]-this.m[13]*this.m[6],d=this.m[4]*this.m[15]-this.m[12]*this.m[7],c=this.m[4]*this.m[14]-this.m[12]*this.m[6],f=this.m[5]*this.m[15]-this.m[13]*this.m[7],p=this.m[4]*this.m[13]-this.m[12]*this.m[5],g=this.m[6]*this.m[11]-this.m[10]*this.m[7],m=this.m[5]*this.m[11]-this.m[9]*this.m[7],w=this.m[5]*this.m[10]-this.m[9]*this.m[6],A=this.m[4]*this.m[11]-this.m[8]*this.m[7],v=this.m[4]*this.m[10]-this.m[8]*this.m[6],y=this.m[4]*this.m[9]-this.m[8]*this.m[5];e[0]=this.m[5]*t-this.m[6]*r+this.m[7]*n,e[4]=-(this.m[4]*t-this.m[6]*s+this.m[7]*o),e[8]=this.m[4]*r-this.m[5]*s+this.m[7]*a,e[12]=-(this.m[4]*n-this.m[5]*o+this.m[6]*a),e[1]=-(this.m[1]*t-this.m[2]*r+this.m[3]*n),e[5]=this.m[0]*t-this.m[2]*s+this.m[3]*o,e[9]=-(this.m[0]*r-this.m[1]*s+this.m[3]*a),e[13]=this.m[0]*n-this.m[1]*o+this.m[2]*a,e[2]=this.m[1]*h-this.m[2]*l+this.m[3]*u,e[6]=-(this.m[0]*h-this.m[2]*d+this.m[3]*c),e[10]=this.m[0]*f-this.m[1]*d+this.m[3]*p,e[14]=-(this.m[0]*u-this.m[1]*c+this.m[2]*p),e[3]=-(this.m[1]*g-this.m[2]*m+this.m[3]*w),e[7]=this.m[0]*g-this.m[2]*A+this.m[3]*v,e[11]=-(this.m[0]*m-this.m[1]*A+this.m[3]*y),e[15]=this.m[0]*w-this.m[1]*v+this.m[2]*y;let V=this.m[0]*e[0]+this.m[1]*e[4]+this.m[2]*e[8]+this.m[3]*e[12];for(let i=0;i<4;i++)for(let t=0;t<4;t++)e[4*i+t]*=1/V;return new i(e)}clone(){return new i([...this.m])}toString(){return this.m.toString()}},"Mat4"),i);function j(e,t,r,i=(e=>-Math.cos(e))){return e+(i(r)+1)/2*(t-e)}P(j,"wave");var Q=2147483648,z=(P(n=class{constructor(e){R(this,"seed"),this.seed=e}gen(){return this.seed=(1103515245*this.seed+12345)%Q,this.seed/Q}genNumber(e,t){return e+this.gen()*(t-e)}genVec2(e,t){return new N(this.genNumber(e.x,t.x),this.genNumber(e.y,t.y))}genColor(e,t){return new O(this.genNumber(e.r,t.r),this.genNumber(e.g,t.g),this.genNumber(e.b,t.b))}genAny(...e){if(0===e.length)return this.gen();if(1===e.length){if("number"==typeof e[0])return this.genNumber(0,e[0]);if(e[0]instanceof N)return this.genVec2(L(0,0),e[0]);if(e[0]instanceof O)return this.genColor(G(0,0,0),e[0])}else if(2===e.length){if("number"==typeof e[0]&&"number"==typeof e[1])return this.genNumber(e[0],e[1]);if(e[0]instanceof N&&e[1]instanceof N)return this.genVec2(e[0],e[1]);if(e[0]instanceof O&&e[1]instanceof O)return this.genColor(e[0],e[1])}}},"RNG"),n),J=new z(Date.now());function X(e){return null!=e&&(J.seed=e),J.seed}function W(...e){return J.genAny(...e)}function Z(...e){return Math.floor(W(...e))}function _(e){return W()<=e}function $(e){return e[Z(e.length)]}function ee(e,t){return e.pos.x+e.width>t.pos.x&&e.pos.xt.pos.y&&e.pos.y1||n<0||n>1?null:i}function re(e,t){let r=te(e,t);return r?L(e.p1.x+r*(e.p2.x-e.p1.x),e.p1.y+r*(e.p2.y-e.p1.y)):null}function ie(e,t){if(ne(e,t.p1)||ne(e,t.p2))return!0;let r=e.points();return!!(re(t,new ue(r[0],r[1]))||re(t,new ue(r[1],r[2]))||re(t,new ue(r[2],r[3]))||re(t,new ue(r[3],r[0])))}function ne(e,t){return t.x>e.pos.x&&t.xe.pos.y&&t.yNumber.EPSILON)return!1;let n=r.dot(i)/i.dot(i);return n>=0&&n<=1}function oe(e,t){let r=e.p2.sub(e.p1),i=r.dot(r),n=e.p1.sub(t.center),s=2*r.dot(n),o=s*s-4*i*(n.dot(n)-t.radius*t.radius);if(i<=Number.EPSILON||o<0)return!1;if(0==o){let e=-s/(2*i);if(e>=0&&e<=1)return!0}else{let e=(-s+Math.sqrt(o))/(2*i),t=(-s-Math.sqrt(o))/(2*i);if(e>=0&&e<=1||t>=0&&t<=1)return!0}return ae(t,e.p1)}function ae(e,t){return e.center.sdist(t)t.y!=i[s].y>t.y&&t.x<(i[s].x-i[n].x)*(t.y-i[n].y)/(i[s].y-i[n].y)+i[n].x&&(r=!r);return r}P(X,"randSeed"),P(W,"rand"),P(Z,"randi"),P(_,"chance"),P($,"choose"),P(ee,"testRectRect"),P(te,"testLineLineT"),P(re,"testLineLine"),P(ie,"testRectLine"),P(ne,"testRectPoint"),P(se,"testLinePoint"),P(oe,"testLineCircle"),P(ae,"testCirclePoint"),P(he,"testCirclePolygon"),P(le,"testPolygonPoint");var ue=(P(s=class{constructor(e,t){R(this,"p1"),R(this,"p2"),this.p1=e.clone(),this.p2=t.clone()}transform(e){return new s(e.multVec2(this.p1),e.multVec2(this.p2))}bbox(){return de.fromPoints(this.p1,this.p2)}area(){return this.p1.dist(this.p2)}clone(){return new s(this.p1,this.p2)}},"Line"),s),de=(P(o=class{constructor(e,t,r){R(this,"pos"),R(this,"width"),R(this,"height"),this.pos=e.clone(),this.width=t,this.height=r}static fromPoints(e,t){return new o(e.clone(),t.x-e.x,t.y-e.y)}center(){return new N(this.pos.x+this.width/2,this.pos.y+this.height/2)}points(){return[this.pos,this.pos.add(this.width,0),this.pos.add(this.width,this.height),this.pos.add(0,this.height)]}transform(e){return new pe(this.points().map((t=>e.multVec2(t))))}bbox(){return this.clone()}area(){return this.width*this.height}clone(){return new o(this.pos.clone(),this.width,this.height)}distToPoint(e){return Math.sqrt(this.sdistToPoint(e))}sdistToPoint(e){let t=this.pos,r=this.pos.add(this.width,this.height),i=Math.max(t.x-e.x,0,e.x-r.x),n=Math.max(t.y-e.y,0,e.y-r.y);return i*i+n*n}},"Rect"),o),ce=(P(a=class{constructor(e,t){R(this,"center"),R(this,"radius"),this.center=e.clone(),this.radius=t}transform(e){return new fe(this.center,this.radius,this.radius).transform(e)}bbox(){return de.fromPoints(this.center.sub(L(this.radius)),this.center.add(L(this.radius)))}area(){return this.radius*this.radius*Math.PI}clone(){return new a(this.center,this.radius)}},"Circle"),a),fe=(P(h=class{constructor(e,t,r){R(this,"center"),R(this,"radiusX"),R(this,"radiusY"),this.center=e.clone(),this.radiusX=t,this.radiusY=r}transform(e){return new h(e.multVec2(this.center),e.m[0]*this.radiusX,e.m[5]*this.radiusY)}bbox(){return de.fromPoints(this.center.sub(L(this.radiusX,this.radiusY)),this.center.add(L(this.radiusX,this.radiusY)))}area(){return this.radiusX*this.radiusY*Math.PI}clone(){return new h(this.center,this.radiusX,this.radiusY)}},"Ellipse"),h),pe=(P(l=class{constructor(e){if(R(this,"pts"),e.length<3)throw new Error("Polygons should have at least 3 vertices");this.pts=e}transform(e){return new l(this.pts.map((t=>e.multVec2(t))))}bbox(){let e=L(Number.MAX_VALUE),t=L(-Number.MAX_VALUE);for(let r of this.pts)e.x=Math.min(e.x,r.x),t.x=Math.max(t.x,r.x),e.y=Math.min(e.y,r.y),t.y=Math.max(t.y,r.y);return de.fromPoints(e,t)}area(){let e=0,t=this.pts.length;for(let r=0;re.clone())))}},"Polygon"),l);function ge(e,t){let r=Number.MAX_VALUE,i=L(0);for(let n of[e,t])for(let s=0;sthis.delete(t)}},P(u,"Registry"),u),we=(P(d=class{constructor(e){R(this,"paused",!1),R(this,"cancel"),this.cancel=e}static join(e){let t=new d((()=>e.forEach((e=>e.cancel()))));return Object.defineProperty(t,"paused",{get:()=>e[0].paused,set:t=>e.forEach((e=>e.paused=t))}),t.paused=!1,t}},"EventController"),d),Ae=(P(c=class{constructor(){R(this,"handlers",new me)}add(e){let t=this.handlers.pushd(((...t)=>{r.paused||e(...t)})),r=new we(t);return r}addOnce(e){let t=this.add(((...r)=>{t.cancel(),e(...r)}));return t}next(){return new Promise((e=>this.addOnce(e)))}trigger(...e){this.handlers.forEach((t=>t(...e)))}numListeners(){return this.handlers.size}clear(){this.handlers.clear()}},"Event"),c),ve=(P(f=class{constructor(){R(this,"handlers",{})}on(e,t){return this.handlers[e]||(this.handlers[e]=new Ae),this.handlers[e].add(t)}onOnce(e,t){let r=this.on(e,((...e)=>{r.cancel(),t(...e)}));return r}next(e){return new Promise((t=>{this.onOnce(e,((...e)=>t(e[0])))}))}trigger(e,...t){this.handlers[e]&&this.handlers[e].trigger(...t)}remove(e){delete this.handlers[e]}clear(){this.handlers={}}numListeners(e){var t;return(null==(t=this.handlers[e])?void 0:t.numListeners())??0}},"EventHandler"),f);function ye(e,t){if(e===t)return!0;let r=typeof e,i=typeof t;if(r!==i)return!1;if("object"===r&&"object"===i&&null!==e&&null!==t){if(Array.isArray(e)!==Array.isArray(t))return!1;let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r){if(!ye(e[n],t[n]))return!1}return!0}return!1}function Ve(e){let t=window.atob(e),r=t.length,i=new Uint8Array(r);for(let n=0;ne.match(/^data:\w+\/\w+;base64,.+/)),"isDataURL"),Te=P((e=>e.split(".").slice(0,-1).join(".")),"getFileName");function Pe(e,t){return(...r)=>{let i=r.length;return i===e.length?e(...r):i===t.length?t(...r):void 0}}P(Pe,"overload2");var Be=(()=>{let e=0;return()=>e++})(),Ie=P((e=>e instanceof Error?e.message:String(e)),"getErrorMessage"),ke=(P(p=class{constructor(e=((e,t)=>e0;){let t=Math.floor((e-1)/2);if(!this._compareFn(this._items[e],this._items[t])&&this._items[e]>=this._items[t])break;this.swap(e,t),e=t}}moveDown(e){for(;e=t&&e<=r}P(De,"runes"),P(Ce,"nextUnits"),P(Ue,"isFirstOfSurrogatePair"),P(Ne,"isRegionalIndicator"),P(Le,"isSubdivisionFlag"),P(Oe,"isFitzpatrickModifier"),P(Ge,"isVariationSelector"),P(qe,"isDiacriticalMark"),P(He,"isSupplementarySpecialpurposePlane"),P(Ke,"isGrapheme"),P(Ye,"isZeroWidthJoiner"),P(je,"codePointFromSurrogatePair"),P(Qe,"betweenInclusive");var ze={"Joy-Con L+R (STANDARD GAMEPAD Vendor: 057e Product: 200e)":{buttons:{0:"south",1:"east",2:"west",3:"north",4:"lshoulder",5:"rshoulder",6:"ltrigger",7:"rtrigger",8:"select",9:"start",10:"lstick",11:"rstick",12:"dpad-up",13:"dpad-down",14:"dpad-left",15:"dpad-right",16:"home",17:"capture"},sticks:{left:{x:0,y:1},right:{x:2,y:3}}},"Joy-Con (L) (STANDARD GAMEPAD Vendor: 057e Product: 2006)":{buttons:{0:"south",1:"east",2:"west",3:"north",4:"lshoulder",5:"rshoulder",9:"select",10:"lstick",16:"start"},sticks:{left:{x:0,y:1}}},"Joy-Con (R) (STANDARD GAMEPAD Vendor: 057e Product: 2007)":{buttons:{0:"south",1:"east",2:"west",3:"north",4:"lshoulder",5:"rshoulder",9:"start",10:"lstick",16:"select"},sticks:{left:{x:0,y:1}}},"Pro Controller (STANDARD GAMEPAD Vendor: 057e Product: 2009)":{buttons:{0:"south",1:"east",2:"west",3:"north",4:"lshoulder",5:"rshoulder",6:"ltrigger",7:"rtrigger",8:"select",9:"start",10:"lstick",11:"rstick",12:"dpad-up",13:"dpad-down",14:"dpad-left",15:"dpad-right",16:"home",17:"capture"},sticks:{left:{x:0,y:1},right:{x:2,y:3}}},default:{buttons:{0:"south",1:"east",2:"west",3:"north",4:"lshoulder",5:"rshoulder",6:"ltrigger",7:"rtrigger",8:"select",9:"start",10:"lstick",11:"rstick",12:"dpad-up",13:"dpad-down",14:"dpad-left",15:"dpad-right",16:"home"},sticks:{left:{x:0,y:1},right:{x:2,y:3}}}},Je=(P(g=class{constructor(){R(this,"pressed",new Set([])),R(this,"pressedRepeat",new Set([])),R(this,"released",new Set([])),R(this,"down",new Set([]))}update(){this.pressed.clear(),this.released.clear(),this.pressedRepeat.clear()}press(e){this.pressed.add(e),this.pressedRepeat.add(e),this.down.add(e)}pressRepeat(e){this.pressedRepeat.add(e)}release(e){this.down.delete(e),this.pressed.delete(e),this.released.add(e)}},"ButtonState"),g),Xe=(P(m=class{constructor(){R(this,"buttonState",new Je),R(this,"stickState",new Map)}},"GamepadState"),m),We=(P(w=class{constructor(){R(this,"dts",[]),R(this,"timer",0),R(this,"fps",0)}tick(e){this.dts.push(e),this.timer+=e,this.timer>=1&&(this.timer=0,this.fps=Math.round(1/(this.dts.reduce(((e,t)=>e+t))/this.dts.length)),this.dts=[])}},"FPSCounter"),w),Ze=P((e=>{if(!e.canvas)throw new Error("Please provide a canvas");let t={canvas:e.canvas,loopID:null,stopped:!1,dt:0,time:0,realTime:0,fpsCounter:new We,timeScale:1,skipTime:!1,numFrames:0,mousePos:new N(0),mouseDeltaPos:new N(0),keyState:new Je,mouseState:new Je,mergedGamepadState:new Xe,gamepadStates:new Map,gamepads:[],charInputted:[],isMouseMoved:!1,lastWidth:e.canvas.offsetWidth,lastHeight:e.canvas.offsetHeight,events:new ve};function r(){return t.dt*t.timeScale}function i(){return t.time}function n(){return t.fpsCounter.fps}function s(){return t.numFrames}function o(){return t.canvas.toDataURL()}function a(e){t.canvas.style.cursor=e}function h(){return t.canvas.style.cursor}function l(e){if(e)try{let e=t.canvas.requestPointerLock();e.catch&&e.catch((e=>console.error(e)))}catch(r){console.error(r)}else document.exitPointerLock()}function u(){return!!document.pointerLockElement}function d(e){e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}function c(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullScreen&&document.webkitExitFullScreen()}function f(){return document.fullscreenElement||document.webkitFullscreenElement}function p(e=!0){e?d(t.canvas):c()}function g(){return!!f()}function m(){t.stopped=!0;for(let e in de)t.canvas.removeEventListener(e,de[e]);for(let e in ce)document.removeEventListener(e,ce[e]);for(let e in fe)window.removeEventListener(e,fe[e]);Ae.disconnect()}function w(i){null!==t.loopID&&cancelAnimationFrame(t.loopID);let n=0,s=P((o=>{if(t.stopped)return;if("visible"!==document.visibilityState)return void(t.loopID=requestAnimationFrame(s));let a=o/1e3,h=a-t.realTime,l=e.maxFPS?1/e.maxFPS:0;t.realTime=a,n+=h,n>l&&(t.skipTime||(t.dt=n,t.time+=r(),t.fpsCounter.tick(t.dt)),n=0,t.skipTime=!1,t.numFrames++,oe(),i(),ae()),t.loopID=requestAnimationFrame(s)}),"frame");s(0)}function A(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function v(){return t.mousePos.clone()}function y(){return t.mouseDeltaPos.clone()}function V(e="left"){return t.mouseState.pressed.has(e)}function x(e="left"){return t.mouseState.down.has(e)}function E(e="left"){return t.mouseState.released.has(e)}function b(){return t.isMouseMoved}function S(e){return void 0===e?t.keyState.pressed.size>0:t.keyState.pressed.has(e)}function R(e){return void 0===e?t.keyState.pressedRepeat.size>0:t.keyState.pressedRepeat.has(e)}function M(e){return void 0===e?t.keyState.down.size>0:t.keyState.down.has(e)}function T(e){return void 0===e?t.keyState.released.size>0:t.keyState.released.has(e)}function B(e){return void 0===e?t.mergedGamepadState.buttonState.pressed.size>0:t.mergedGamepadState.buttonState.pressed.has(e)}function I(e){return void 0===e?t.mergedGamepadState.buttonState.down.size>0:t.mergedGamepadState.buttonState.down.has(e)}function k(e){return void 0===e?t.mergedGamepadState.buttonState.released.size>0:t.mergedGamepadState.buttonState.released.has(e)}function F(e){return t.events.on("resize",e)}P(r,"dt"),P(i,"time"),P(n,"fps"),P(s,"numFrames"),P(o,"screenshot"),P(a,"setCursor"),P(h,"getCursor"),P(l,"setCursorLocked"),P(u,"isCursorLocked"),P(d,"enterFullscreen"),P(c,"exitFullscreen"),P(f,"getFullscreenElement"),P(p,"setFullscreen"),P(g,"isFullscreen"),P(m,"quit"),P(w,"run"),P(A,"isTouchscreen"),P(v,"mousePos"),P(y,"mouseDeltaPos"),P(V,"isMousePressed"),P(x,"isMouseDown"),P(E,"isMouseReleased"),P(b,"isMouseMoved"),P(S,"isKeyPressed"),P(R,"isKeyPressedRepeat"),P(M,"isKeyDown"),P(T,"isKeyReleased"),P(B,"isGamepadButtonPressed"),P(I,"isGamepadButtonDown"),P(k,"isGamepadButtonReleased"),P(F,"onResize");let D=Pe((e=>t.events.on("keyDown",e)),((e,r)=>t.events.on("keyDown",(t=>t===e&&r(e))))),U=Pe((e=>t.events.on("keyPress",e)),((e,r)=>t.events.on("keyPress",(t=>t===e&&r(e))))),L=Pe((e=>t.events.on("keyPressRepeat",e)),((e,r)=>t.events.on("keyPressRepeat",(t=>t===e&&r(e))))),O=Pe((e=>t.events.on("keyRelease",e)),((e,r)=>t.events.on("keyRelease",(t=>t===e&&r(e))))),G=Pe((e=>t.events.on("mouseDown",(t=>e(t)))),((e,r)=>t.events.on("mouseDown",(t=>t===e&&r(t))))),q=Pe((e=>t.events.on("mousePress",(t=>e(t)))),((e,r)=>t.events.on("mousePress",(t=>t===e&&r(t))))),H=Pe((e=>t.events.on("mouseRelease",(t=>e(t)))),((e,r)=>t.events.on("mouseRelease",(t=>t===e&&r(t)))));function K(e){return t.events.on("mouseMove",(()=>e(v(),y())))}function Y(e){return t.events.on("charInput",e)}function j(e){return t.events.on("touchStart",e)}function Q(e){return t.events.on("touchMove",e)}function z(e){return t.events.on("touchEnd",e)}function J(e){return t.events.on("scroll",e)}function X(e){return t.events.on("hide",e)}function W(e){return t.events.on("show",e)}function Z(e,r){return"function"==typeof e?t.events.on("gamepadButtonDown",e):"string"==typeof e&&"function"==typeof r?t.events.on("gamepadButtonDown",(t=>t===e&&r(e))):void 0}function _(e,r){return"function"==typeof e?t.events.on("gamepadButtonPress",e):"string"==typeof e&&"function"==typeof r?t.events.on("gamepadButtonPress",(t=>t===e&&r(e))):void 0}function $(e,r){return"function"==typeof e?t.events.on("gamepadButtonRelease",e):"string"==typeof e&&"function"==typeof r?t.events.on("gamepadButtonRelease",(t=>t===e&&r(e))):void 0}function ee(e,r){return t.events.on("gamepadStick",((t,i)=>t===e&&r(i)))}function te(e){t.events.on("gamepadConnect",e)}function re(e){t.events.on("gamepadDisconnect",e)}function ie(e){return t.mergedGamepadState.stickState.get(e)||new N(0)}function ne(){return[...t.charInputted]}function se(){return[...t.gamepads]}function oe(){t.events.trigger("input"),t.keyState.down.forEach((e=>t.events.trigger("keyDown",e))),t.mouseState.down.forEach((e=>t.events.trigger("mouseDown",e))),ue()}function ae(){t.keyState.update(),t.mouseState.update(),t.mergedGamepadState.buttonState.update(),t.mergedGamepadState.stickState.forEach(((e,r)=>{t.mergedGamepadState.stickState.set(r,new N(0))})),t.charInputted=[],t.isMouseMoved=!1,t.gamepadStates.forEach((e=>{e.buttonState.update(),e.stickState.forEach(((t,r)=>{e.stickState.set(r,new N(0))}))}))}function he(e){let r={index:e.index,isPressed:r=>t.gamepadStates.get(e.index).buttonState.pressed.has(r),isDown:r=>t.gamepadStates.get(e.index).buttonState.down.has(r),isReleased:r=>t.gamepadStates.get(e.index).buttonState.released.has(r),getStick:r=>t.gamepadStates.get(e.index).stickState.get(r)};return t.gamepads.push(r),t.gamepadStates.set(e.index,{buttonState:new Je,stickState:new Map([["left",new N(0)],["right",new N(0)]])}),r}function le(e){t.gamepads=t.gamepads.filter((t=>t.index!==e.index)),t.gamepadStates.delete(e.index)}function ue(){for(let e of navigator.getGamepads())e&&!t.gamepadStates.has(e.index)&&he(e);for(let r of t.gamepads){let i=navigator.getGamepads()[r.index],n=(e.gamepads??{})[i.id]??ze[i.id]??ze.default,s=t.gamepadStates.get(r.index);for(let e=0;e{let r=new N(e.offsetX,e.offsetY),i=new N(e.movementX,e.movementY);if(g()){let i=t.canvas.width/pe,n=t.canvas.height/pe,s=window.innerWidth,o=window.innerHeight;if(s/o>i/n){let t=o/n,a=(s-i*t)/2;r.x=C(e.offsetX-a,0,i*t,0,i),r.y=C(e.offsetY,0,n*t,0,n)}else{let t=s/i,a=(o-n*t)/2;r.x=C(e.offsetX,0,i*t,0,i),r.y=C(e.offsetY-a,0,n*t,0,n)}}t.events.onOnce("input",(()=>{t.isMouseMoved=!0,t.mousePos=r,t.mouseDeltaPos=i,t.events.trigger("mouseMove")}))};let ge=["left","middle","right","back","forward"];de.mousedown=e=>{t.events.onOnce("input",(()=>{let r=ge[e.button];r&&(t.mouseState.press(r),t.events.trigger("mousePress",r))}))},de.mouseup=e=>{t.events.onOnce("input",(()=>{let r=ge[e.button];r&&(t.mouseState.release(r),t.events.trigger("mouseRelease",r))}))};let me=new Set([" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab"]),we={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"," ":"space"};de.keydown=e=>{me.has(e.key)&&e.preventDefault(),t.events.onOnce("input",(()=>{let r=we[e.key]||e.key.toLowerCase();1===r.length?(t.events.trigger("charInput",r),t.charInputted.push(r)):"space"===r&&(t.events.trigger("charInput"," "),t.charInputted.push(" ")),e.repeat?(t.keyState.pressRepeat(r),t.events.trigger("keyPressRepeat",r)):(t.keyState.press(r),t.events.trigger("keyPressRepeat",r),t.events.trigger("keyPress",r))}))},de.keyup=e=>{t.events.onOnce("input",(()=>{let r=we[e.key]||e.key.toLowerCase();t.keyState.release(r),t.events.trigger("keyRelease",r)}))},de.touchstart=r=>{r.preventDefault(),t.events.onOnce("input",(()=>{let i=[...r.changedTouches],n=t.canvas.getBoundingClientRect();!1!==e.touchToMouse&&(t.mousePos=new N(i[0].clientX-n.x,i[0].clientY-n.y),t.mouseState.press("left"),t.events.trigger("mousePress","left")),i.forEach((e=>{t.events.trigger("touchStart",new N(e.clientX-n.x,e.clientY-n.y),e)}))}))},de.touchmove=r=>{r.preventDefault(),t.events.onOnce("input",(()=>{let i=[...r.changedTouches],n=t.canvas.getBoundingClientRect();!1!==e.touchToMouse&&(t.mousePos=new N(i[0].clientX-n.x,i[0].clientY-n.y),t.events.trigger("mouseMove")),i.forEach((e=>{t.events.trigger("touchMove",new N(e.clientX-n.x,e.clientY-n.y),e)}))}))},de.touchend=r=>{t.events.onOnce("input",(()=>{let i=[...r.changedTouches],n=t.canvas.getBoundingClientRect();!1!==e.touchToMouse&&(t.mousePos=new N(i[0].clientX-n.x,i[0].clientY-n.y),t.mouseState.release("left"),t.events.trigger("mouseRelease","left")),i.forEach((e=>{t.events.trigger("touchEnd",new N(e.clientX-n.x,e.clientY-n.y),e)}))}))},de.touchcancel=r=>{t.events.onOnce("input",(()=>{let i=[...r.changedTouches],n=t.canvas.getBoundingClientRect();!1!==e.touchToMouse&&(t.mousePos=new N(i[0].clientX-n.x,i[0].clientY-n.y),t.mouseState.release("left"),t.events.trigger("mouseRelease","left")),i.forEach((e=>{t.events.trigger("touchEnd",new N(e.clientX-n.x,e.clientY-n.y),e)}))}))},de.wheel=e=>{e.preventDefault(),t.events.onOnce("input",(()=>{t.events.trigger("scroll",new N(e.deltaX,e.deltaY))}))},de.contextmenu=e=>e.preventDefault(),ce.visibilitychange=()=>{"visible"===document.visibilityState?(t.skipTime=!0,t.events.trigger("show")):t.events.trigger("hide")},fe.gamepadconnected=e=>{let r=he(e.gamepad);t.events.onOnce("input",(()=>{t.events.trigger("gamepadConnect",r)}))},fe.gamepaddisconnected=e=>{let r=se().filter((t=>t.index===e.gamepad.index))[0];le(e.gamepad),t.events.onOnce("input",(()=>{t.events.trigger("gamepadDisconnect",r)}))};for(let P in de)t.canvas.addEventListener(P,de[P]);for(let P in ce)document.addEventListener(P,ce[P]);for(let P in fe)window.addEventListener(P,fe[P]);let Ae=new ResizeObserver((e=>{for(let r of e)if(r.target===t.canvas){if(t.lastWidth===t.canvas.offsetWidth&&t.lastHeight===t.canvas.offsetHeight)return;t.lastWidth=t.canvas.offsetWidth,t.lastHeight=t.canvas.offsetHeight,t.events.onOnce("input",(()=>{t.events.trigger("resize")}))}}));return Ae.observe(t.canvas),{dt:r,time:i,run:w,canvas:t.canvas,fps:n,numFrames:s,quit:m,setFullscreen:p,isFullscreen:g,setCursor:a,screenshot:o,getGamepads:se,getCursor:h,setCursorLocked:l,isCursorLocked:u,isTouchscreen:A,mousePos:v,mouseDeltaPos:y,isKeyDown:M,isKeyPressed:S,isKeyPressedRepeat:R,isKeyReleased:T,isMouseDown:x,isMousePressed:V,isMouseReleased:E,isMouseMoved:b,isGamepadButtonPressed:B,isGamepadButtonDown:I,isGamepadButtonReleased:k,getGamepadStick:ie,charInputted:ne,onResize:F,onKeyDown:D,onKeyPress:U,onKeyPressRepeat:L,onKeyRelease:O,onMouseDown:G,onMousePress:q,onMouseRelease:H,onMouseMove:K,onCharInput:Y,onTouchStart:j,onTouchMove:Q,onTouchEnd:z,onScroll:J,onHide:X,onShow:W,onGamepadButtonDown:Z,onGamepadButtonPress:_,onGamepadButtonRelease:$,onGamepadStick:ee,onGamepadConnect:te,onGamepadDisconnect:re,events:t.events}}),"default"),_e=(P(A=class{constructor(e,t,r,i={}){R(this,"ctx"),R(this,"src",null),R(this,"glTex"),R(this,"width"),R(this,"height"),this.ctx=e;let n=e.gl;this.glTex=e.gl.createTexture(),e.onDestroy((()=>this.free())),this.width=t,this.height=r;let s={linear:n.LINEAR,nearest:n.NEAREST}[i.filter??e.opts.texFilter]??n.NEAREST,o={repeat:n.REPEAT,clampToEadge:n.CLAMP_TO_EDGE}[i.wrap]??n.CLAMP_TO_EDGE;this.bind(),t&&r&&n.texImage2D(n.TEXTURE_2D,0,n.RGBA,t,r,0,n.RGBA,n.UNSIGNED_BYTE,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,s),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,s),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,o),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,o),this.unbind()}static fromImage(e,t,r={}){let i=new A(e,t.width,t.height,r);return i.update(t),i.src=t,i}update(e,t=0,r=0){let i=this.ctx.gl;this.bind(),i.texSubImage2D(i.TEXTURE_2D,0,t,r,i.RGBA,i.UNSIGNED_BYTE,e),this.unbind()}bind(){this.ctx.pushTexture2D(this.glTex)}unbind(){this.ctx.popTexture2D()}free(){this.ctx.gl.deleteTexture(this.glTex)}},"Texture"),A),$e=(P(v=class{constructor(e,t,r,i={}){R(this,"ctx"),R(this,"tex"),R(this,"glFramebuffer"),R(this,"glRenderbuffer"),this.ctx=e;let n=e.gl;e.onDestroy((()=>this.free())),this.tex=new _e(e,t,r,i),this.glFramebuffer=n.createFramebuffer(),this.glRenderbuffer=n.createRenderbuffer(),this.bind(),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t,r),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.tex.glTex,0),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,this.glRenderbuffer),this.unbind()}get width(){return this.tex.width}get height(){return this.tex.height}toImageData(){let e=this.ctx.gl,t=new Uint8ClampedArray(this.width*this.height*4);this.bind(),e.readPixels(0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,t),this.unbind();let r=4*this.width,i=new Uint8Array(r);for(let n=0;n<(this.height/2|0);n++){let e=n*r,s=(this.height-n-1)*r;i.set(t.subarray(e,e+r)),t.copyWithin(e,s,s+r),t.set(i,s)}return new ImageData(t,this.width,this.height)}toDataURL(){let e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this.width,e.height=this.height,t.putImageData(this.toImageData(),0,0),e.toDataURL()}draw(e){this.bind(),e(),this.unbind()}bind(){this.ctx.pushFramebuffer(this.glFramebuffer),this.ctx.pushRenderbuffer(this.glRenderbuffer),this.ctx.pushViewport({x:0,y:0,w:this.width,h:this.height})}unbind(){this.ctx.popFramebuffer(),this.ctx.popRenderbuffer(),this.ctx.popViewport()}free(){let e=this.ctx.gl;e.deleteFramebuffer(this.glFramebuffer),e.deleteRenderbuffer(this.glRenderbuffer),this.tex.free()}},"FrameBuffer"),v),et=(P(y=class{constructor(e,t,r,i){R(this,"ctx"),R(this,"glProgram"),this.ctx=e,e.onDestroy((()=>this.free()));let n=e.gl,s=n.createShader(n.VERTEX_SHADER),o=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(s,t),n.shaderSource(o,r),n.compileShader(s),n.compileShader(o);let a=n.createProgram();if(this.glProgram=a,n.attachShader(a,s),n.attachShader(a,o),i.forEach(((e,t)=>n.bindAttribLocation(a,t,e))),n.linkProgram(a),!n.getProgramParameter(a,n.LINK_STATUS)){let e=n.getShaderInfoLog(s);if(e)throw new Error("VERTEX SHADER "+e);let t=n.getShaderInfoLog(o);if(t)throw new Error("FRAGMENT SHADER "+t)}n.deleteShader(s),n.deleteShader(o)}bind(){this.ctx.pushProgram(this.glProgram)}unbind(){this.ctx.popProgram()}send(e){let t=this.ctx.gl;for(let r in e){let i=e[r],n=t.getUniformLocation(this.glProgram,r);"number"==typeof i?t.uniform1f(n,i):i instanceof Y?t.uniformMatrix4fv(n,!1,new Float32Array(i.m)):i instanceof O?t.uniform3f(n,i.r,i.g,i.b):i instanceof N&&t.uniform2f(n,i.x,i.y)}}free(){this.ctx.gl.deleteProgram(this.glProgram)}},"Shader"),y),tt=(P(V=class{constructor(e,t,r,i){R(this,"ctx"),R(this,"glVBuf"),R(this,"glIBuf"),R(this,"vqueue",[]),R(this,"iqueue",[]),R(this,"stride"),R(this,"maxVertices"),R(this,"maxIndices"),R(this,"vertexFormat"),R(this,"numDraws",0),R(this,"curPrimitive",null),R(this,"curTex",null),R(this,"curShader",null),R(this,"curUniform",{});let n=e.gl;this.vertexFormat=t,this.ctx=e,this.stride=t.reduce(((e,t)=>e+t.size),0),this.maxVertices=r,this.maxIndices=i,this.glVBuf=n.createBuffer(),e.pushArrayBuffer(this.glVBuf),n.bufferData(n.ARRAY_BUFFER,4*r,n.DYNAMIC_DRAW),e.popArrayBuffer(),this.glIBuf=n.createBuffer(),e.pushElementArrayBuffer(this.glIBuf),n.bufferData(n.ELEMENT_ARRAY_BUFFER,4*i,n.DYNAMIC_DRAW),e.popElementArrayBuffer()}push(e,t,r,i,n=null,s={}){(e!==this.curPrimitive||n!==this.curTex||i!==this.curShader||!ye(this.curUniform,s)||this.vqueue.length+t.length*this.stride>this.maxVertices||this.iqueue.length+r.length>this.maxIndices)&&this.flush();let o=this.vqueue.length/this.stride;for(let a of t)this.vqueue.push(a);for(let a of r)this.iqueue.push(a+o);this.curPrimitive=e,this.curShader=i,this.curTex=n,this.curUniform=s}flush(){var e,t;if(!this.curPrimitive||!this.curShader||0===this.vqueue.length||0===this.iqueue.length)return;let r=this.ctx.gl;this.ctx.pushArrayBuffer(this.glVBuf),r.bufferSubData(r.ARRAY_BUFFER,0,new Float32Array(this.vqueue)),this.ctx.pushElementArrayBuffer(this.glIBuf),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,new Uint16Array(this.iqueue)),this.ctx.setVertexFormat(this.vertexFormat),this.curShader.bind(),this.curShader.send(this.curUniform),null==(e=this.curTex)||e.bind(),r.drawElements(this.curPrimitive,this.iqueue.length,r.UNSIGNED_SHORT,0),null==(t=this.curTex)||t.unbind(),this.curShader.unbind(),this.ctx.popArrayBuffer(),this.ctx.popElementArrayBuffer(),this.vqueue=[],this.iqueue=[],this.numDraws++}free(){let e=this.ctx.gl;e.deleteBuffer(this.glVBuf),e.deleteBuffer(this.glIBuf)}},"BatchRenderer"),V);function rt(e){let t=[],r=P((r=>{t.push(r),e(r)}),"push"),i=P((()=>{t.pop(),e(n()??null)}),"pop"),n=P((()=>t[t.length-1]),"cur");return[r,i,n]}function it(e,t={}){let r=[];function i(e){r.push(e)}function n(){r.forEach((e=>e())),e.getExtension("WEBGL_lose_context").loseContext()}P(i,"onDestroy"),P(n,"destroy");let s=null;function o(t){if(ye(t,s))return;s=t;let r=t.reduce(((e,t)=>e+t.size),0);t.reduce(((t,i,n)=>(e.vertexAttribPointer(n,i.size,e.FLOAT,!1,4*r,t),e.enableVertexAttribArray(n),t+4*i.size)),0)}P(o,"setVertexFormat");let[a,h]=rt((t=>e.bindTexture(e.TEXTURE_2D,t))),[l,u]=rt((t=>e.bindBuffer(e.ARRAY_BUFFER,t))),[d,c]=rt((t=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t))),[f,p]=rt((t=>e.bindFramebuffer(e.FRAMEBUFFER,t))),[g,m]=rt((t=>e.bindRenderbuffer(e.RENDERBUFFER,t))),[w,A]=rt((({x:t,y:r,w:i,h:n})=>{e.viewport(t,r,i,n)})),[v,y]=rt((t=>e.useProgram(t)));return w({x:0,y:0,w:e.drawingBufferWidth,h:e.drawingBufferHeight}),{gl:e,opts:t,onDestroy:i,destroy:n,pushTexture2D:a,popTexture2D:h,pushArrayBuffer:l,popArrayBuffer:u,pushElementArrayBuffer:d,popElementArrayBuffer:c,pushFramebuffer:f,popFramebuffer:p,pushRenderbuffer:g,popRenderbuffer:m,pushViewport:w,popViewport:A,pushProgram:v,popProgram:y,setVertexFormat:o}}P(rt,"genStack"),P(it,"initGfx");var nt=(P(x=class{constructor(e){R(this,"loaded",!1),R(this,"data",null),R(this,"error",null),R(this,"onLoadEvents",new Ae),R(this,"onErrorEvents",new Ae),R(this,"onFinishEvents",new Ae),e.then((e=>{this.data=e,this.onLoadEvents.trigger(e)})).catch((e=>{if(this.error=e,!(this.onErrorEvents.numListeners()>0))throw e;this.onErrorEvents.trigger(e)})).finally((()=>{this.onFinishEvents.trigger(),this.loaded=!0}))}static loaded(e){let t=new x(Promise.resolve(e));return t.data=e,t.loaded=!0,t}onLoad(e){return this.loaded&&this.data?e(this.data):this.onLoadEvents.add(e),this}onError(e){return this.loaded&&this.error?e(this.error):this.onErrorEvents.add(e),this}onFinish(e){return this.loaded?e():this.onFinishEvents.add(e),this}then(e){return this.onLoad(e)}catch(e){return this.onError(e)}finally(e){return this.onFinish(e)}},"Asset"),x),st=(P(E=class{constructor(){R(this,"assets",new Map),R(this,"lastUID",0)}add(e,t){let r=e??this.lastUID+++"",i=new nt(t);return this.assets.set(r,i),i}addLoaded(e,t){let r=e??this.lastUID+++"",i=nt.loaded(t);return this.assets.set(r,i),i}get(e){return this.assets.get(e)}progress(){if(0===this.assets.size)return 1;let e=0;return this.assets.forEach((t=>{t.loaded&&e++})),e/this.assets.size}},"AssetBucket"),E);function ot(e){return fetch(e).then((t=>{if(!t.ok)throw new Error(`Failed to fetch "${e}"`);return t}))}function at(e){return ot(e).then((e=>e.json()))}function ht(e){return ot(e).then((e=>e.text()))}function lt(e){return ot(e).then((e=>e.arrayBuffer()))}function ut(e){let t=new Image;return t.crossOrigin="anonymous",t.src=e,new Promise(((r,i)=>{t.onload=()=>r(t),t.onerror=()=>i(new Error(`Failed to load image from "${e}"`))}))}P(ot,"fetchURL"),P(at,"fetchJSON"),P(ht,"fetchText"),P(lt,"fetchArrayBuffer"),P(ut,"loadImg");var dt=2.5949095,ct=2.70158,ft=2*Math.PI/3,pt=2*Math.PI/4.5,gt={linear:e=>e,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ct*e*e*e-1.70158*e*e,easeOutBack:e=>1+ct*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-dt)/2:(Math.pow(2*e-2,2)*((dt+1)*(2*e-2)+dt)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ft),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ft)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*pt)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*pt)/2+1,easeInBounce:e=>1-gt.easeOutBounce(1-e),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInOutBounce:e=>e<.5?(1-gt.easeOutBounce(1-2*e))/2:(1+gt.easeOutBounce(2*e-1))/2},mt=gt,wt=(P(b=class{constructor(e,t,r){R(this,"textures",[]),R(this,"canvas"),R(this,"c2d"),R(this,"x",0),R(this,"y",0),R(this,"curHeight",0),R(this,"gfx"),this.gfx=e,this.canvas=document.createElement("canvas"),this.canvas.width=t,this.canvas.height=r,this.textures=[_e.fromImage(e,this.canvas)],this.c2d=this.canvas.getContext("2d")}add(e){if(e.width>this.canvas.width||e.height>this.canvas.height)throw new Error(`Texture size (${e.width} x ${e.height}) exceeds limit (${this.canvas.width} x ${this.canvas.height})`);this.x+e.width>this.canvas.width&&(this.x=0,this.y+=this.curHeight,this.curHeight=0),this.y+e.height>this.canvas.height&&(this.c2d.clearRect(0,0,this.canvas.width,this.canvas.height),this.textures.push(_e.fromImage(this.gfx,this.canvas)),this.x=0,this.y=0,this.curHeight=0);let t=this.textures[this.textures.length-1],r=new N(this.x,this.y);return this.x+=e.width,e.height>this.curHeight&&(this.curHeight=e.height),e instanceof ImageData?this.c2d.putImageData(e,r.x,r.y):this.c2d.drawImage(e,r.x,r.y),t.update(this.canvas),[t,new H(r.x/this.canvas.width,r.y/this.canvas.height,e.width/this.canvas.width,e.height/this.canvas.height)]}free(){for(let e of this.textures)e.free()}},"TexPacker"),b),At=B("SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2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T3GiAAAAAGkHAAAIAAANIOAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),vt=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",yt="topleft",Vt="monospace",xt=256,Et="linear",bt=[{name:"a_pos",size:2},{name:"a_uv",size:2},{name:"a_color",size:4}],St=8192*bt.reduce(((e,t)=>e+t.size),0),Rt="\nattribute vec2 a_pos;\nattribute vec2 a_uv;\nattribute vec4 a_color;\n\nvarying vec2 v_pos;\nvarying vec2 v_uv;\nvarying vec4 v_color;\n\nvec4 def_vert() {\n\treturn vec4(a_pos, 0.0, 1.0);\n}\n\n{{user}}\n\nvoid main() {\n\tvec4 pos = vert(a_pos, a_uv, a_color);\n\tv_pos = a_pos;\n\tv_uv = a_uv;\n\tv_color = a_color;\n\tgl_Position = pos;\n}\n",Mt="\nprecision mediump float;\n\nvarying vec2 v_pos;\nvarying vec2 v_uv;\nvarying vec4 v_color;\n\nuniform sampler2D u_tex;\n\nvec4 def_frag() {\n\treturn v_color * texture2D(u_tex, v_uv);\n}\n\n{{user}}\n\nvoid main() {\n\tgl_FragColor = frag(v_pos, v_uv, v_color, u_tex);\n\tif (gl_FragColor.a == 0.0) {\n\t\tdiscard;\n\t}\n}\n",Tt="\nvec4 vert(vec2 pos, vec2 uv, vec4 color) {\n\treturn def_vert();\n}\n",Pt="\nvec4 frag(vec2 pos, vec2 uv, vec4 color, sampler2D tex) {\n\treturn def_frag();\n}\n",Bt=new Set(["id","require"]),It=new Set(["add","update","draw","destroy","inspect","drawInspect"]);function kt(e){switch(e){case"topleft":return new N(-1,-1);case"top":return new N(0,-1);case"topright":return new N(1,-1);case"left":return new N(-1,0);case"center":return new N(0,0);case"right":return new N(1,0);case"botleft":return new N(-1,1);case"bot":return new N(0,1);case"botright":return new N(1,1);default:return e}}function Ft(e){switch(e){case"left":default:return 0;case"center":return.5;case"right":return 1}}function Dt(e){return e.createBuffer(1,1,44100)}P(kt,"anchorPt"),P(Ft,"alignPt"),P(Dt,"createEmptyAudioBuffer");const Ct=P(((e={})=>{let t=e.root??document.body;t===document.body&&(document.body.style.width="100%",document.body.style.height="100%",document.body.style.margin="0px",document.documentElement.style.width="100%",document.documentElement.style.height="100%");let r=e.canvas??(()=>{let e=document.createElement("canvas");return t.appendChild(e),e})(),i=e.scale??1,n=e.width&&e.height&&!e.stretch&&!e.letterbox;n?(r.width=e.width*i,r.height=e.height*i):(r.width=r.parentElement.offsetWidth,r.height=r.parentElement.offsetHeight);let s=["outline: none","cursor: default"];if(n){let e=r.width,t=r.height;s.push(`width: ${e}px`),s.push(`height: ${t}px`)}else s.push("width: 100%"),s.push("height: 100%");e.crisp&&(s.push("image-rendering: pixelated"),s.push("image-rendering: crisp-edges")),r.style.cssText=s.join(";");let o=e.pixelDensity||window.devicePixelRatio;r.width*=o,r.height*=o,r.tabIndex=0;let a=document.createElement("canvas");a.width=xt,a.height=xt;let h=a.getContext("2d",{willReadFrequently:!0}),l=Ze({canvas:r,touchToMouse:e.touchToMouse,gamepads:e.gamepads,pixelDensity:e.pixelDensity,maxFPS:e.maxFPS}),u=[],d=l.canvas.getContext("webgl",{antialias:!0,depth:!0,stencil:!0,alpha:!0,preserveDrawingBuffer:!0}),c=it(d,{texFilter:e.texFilter}),f=(()=>{let t=ot(Tt,Pt),r=_e.fromImage(c,new ImageData(new Uint8ClampedArray([255,255,255,255]),1,1)),n=e.width&&e.height?new $e(c,e.width*o*i,e.height*o*i):new $e(c,d.drawingBufferWidth,d.drawingBufferHeight),s=null,a=1;e.background&&(s=G(e.background),a=Array.isArray(e.background)?e.background[3]:1,d.clearColor(s.r/255,s.g/255,s.b/255,a??1)),d.enable(d.BLEND),d.blendFuncSeparate(d.SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA,d.ONE,d.ONE_MINUS_SRC_ALPHA);let h=new tt(c,bt,St,12288),l=_e.fromImage(c,new ImageData(new Uint8ClampedArray([128,128,128,255,190,190,190,255,190,190,190,255,128,128,128,255]),2,2),{wrap:"repeat",filter:"nearest"});return{lastDrawCalls:0,defShader:t,defTex:r,frameBuffer:n,postShader:null,postShaderUniform:null,renderer:h,transform:new Y,transformStack:[],bgTex:l,bgColor:s,bgAlpha:a,width:e.width??d.drawingBufferWidth/o/i,height:e.height??d.drawingBufferHeight/o/i,viewport:{x:0,y:0,width:d.drawingBufferWidth,height:d.drawingBufferHeight},fixed:!1}})();const p=class e{constructor(e,t,r={},i=null){R(this,"tex"),R(this,"frames",[new H(0,0,1,1)]),R(this,"anims",{}),R(this,"slice9",null),this.tex=e,t&&(this.frames=t),this.anims=r,this.slice9=i}get width(){return this.tex.width*this.frames[0].w}get height(){return this.tex.height*this.frames[0].h}static from(t,r={}){return"string"==typeof t?e.fromURL(t,r):Promise.resolve(e.fromImage(t,r))}static fromImage(t,r={}){let[i,n]=v.packer.add(t),s=r.frames?r.frames.map((e=>new H(n.x+e.x*n.w,n.y+e.y*n.h,e.w*n.w,e.h*n.h))):J(r.sliceX||1,r.sliceY||1,n.x,n.y,n.w,n.h);return new e(i,s,r.anims,r.slice9)}static fromURL(t,r={}){return ut(t).then((t=>e.fromImage(t,r)))}};P(p,"SpriteData");let g=p;const m=class e{constructor(e){R(this,"buf"),this.buf=e}static fromArrayBuffer(t){return new Promise(((e,r)=>A.ctx.decodeAudioData(t,e,r))).then((t=>new e(t)))}static fromURL(t){return Me(t)?e.fromArrayBuffer(xe(t)):lt(t).then((t=>e.fromArrayBuffer(t)))}};P(m,"SoundData");let w=m,A=(()=>{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createGain();t.connect(e.destination);let r=new w(Dt(e));return e.decodeAudioData(At.buffer.slice(0)).then((e=>{r.buf=e})).catch((e=>{console.error("Failed to load burp: ",e)})),{ctx:e,masterNode:t,burpSnd:r}})(),v={urlPrefix:"",sprites:new st,fonts:new st,bitmapFonts:new st,sounds:new st,shaders:new st,custom:new st,packer:new wt(c,2048,2048),loaded:!1};function y(e){return"string"!=typeof e||Me(e)?e:v.urlPrefix+e}P(y,"fixURL");let V={events:new ve,objEvents:new ve,root:Mr([]),gravity:0,scenes:{},logs:[],cam:{pos:null,scale:new N(1),angle:0,shake:0,transform:new Y}};function x(e){return v.custom.add(null,e)}function E(){let e=[v.sprites,v.sounds,v.shaders,v.fonts,v.bitmapFonts,v.custom];return e.reduce(((e,t)=>e+t.progress()),0)/e.length}function b(e){return void 0!==e&&(v.urlPrefix=e),v.urlPrefix}function S(e,t){return v.custom.add(e,at(t))}V.root.use(ci()),P(x,"load"),P(E,"loadProgress"),P(b,"loadRoot"),P(S,"loadJSON");const M=class{constructor(e,t={}){if(R(this,"fontface"),R(this,"filter",Et),R(this,"outline",null),R(this,"size",64),this.fontface=e,this.filter=t.filter??Et,this.size=t.size??64,this.size>xt)throw new Error("Max font size: 256");t.outline&&(this.outline={width:1,color:G(0,0,0)},"number"==typeof t.outline?this.outline.width=t.outline:"object"==typeof t.outline&&(t.outline.width&&(this.outline.width=t.outline.width),t.outline.color&&(this.outline.color=t.outline.color)))}};P(M,"FontData");let T=M;function B(e,t,r={}){let i=new FontFace(e,"string"==typeof t?`url(${t})`:t);return document.fonts.add(i),v.fonts.add(e,i.load().catch((e=>{throw new Error(`Failed to load font from "${t}": ${e}`)})).then((e=>new T(e,r))))}function Q(e,t,r,i,n={}){return v.bitmapFonts.add(e,ut(t).then((e=>dt(_e.fromImage(c,e,n),r,i,n.chars??vt))))}function J(e=1,t=1,r=0,i=0,n=1,s=1){let o=[],a=n/e,h=s/t;for(let l=0;l{at(t).then((t=>{te(e,t).then(r).catch(i)}))})):g.from(e).then((e=>{let r={};for(let i in t){let n=t[i],s=e.frames[0],o=2048*s.w,a=2048*s.h,h=n.frames?n.frames.map((e=>new H(s.x+(n.x+e.x)/o*s.w,s.y+(n.y+e.y)/a*s.h,e.w/o*s.w,e.h/a*s.h))):J(n.sliceX||1,n.sliceY||1,s.x+n.x/o*s.w,s.y+n.y/a*s.h,n.width/o*s.w,n.height/a*s.h),l=new g(e.tex,h,n.anims);v.sprites.addLoaded(i,l),r[i]=l}return r})))}function ae(e,t={}){let r=document.createElement("canvas"),i=e[0].width,n=e[0].height;r.width=i*e.length,r.height=n;let s=r.getContext("2d");e.forEach(((e,t)=>{e instanceof ImageData?s.putImageData(e,t*i,0):s.drawImage(e,t*i,0)}));let o=s.getImageData(0,0,e.length*i,n);return g.fromImage(o,{...t,sliceX:e.length,sliceY:1})}function fe(e,t,r={sliceX:1,sliceY:1,anims:{}}){return t=y(t),Array.isArray(t)?t.some((e=>"string"==typeof e))?v.sprites.add(e,Promise.all(t.map((e=>"string"==typeof e?ut(e):Promise.resolve(e)))).then((e=>ae(e,r)))):v.sprites.addLoaded(e,ae(t,r)):"string"==typeof t?v.sprites.add(e,g.from(t,r)):v.sprites.addLoaded(e,g.fromImage(t,r))}function ye(e,t){return t=y(t),v.sprites.add(e,new Promise((async e=>{let r="string"==typeof t?await at(t):t,i=await Promise.all(r.frames.map(ut)),n=document.createElement("canvas");n.width=r.width,n.height=r.height*r.frames.length;let s=n.getContext("2d");i.forEach(((e,t)=>{s.drawImage(e,0,t*r.height)})),e(await fe(null,n,{sliceY:r.frames.length,anims:r.anims}))})))}function Ve(e,t,r){t=y(t),r=y(r),"string"==typeof t&&!r&&(r=Te(t)+".json");let i="string"==typeof r?at(r):Promise.resolve(r);return v.sprites.add(e,i.then((e=>{let r=e.meta.size,i=e.frames.map((e=>new H(e.frame.x/r.w,e.frame.y/r.h,e.frame.w/r.w,e.frame.h/r.h))),n={};for(let t of e.meta.frameTags)t.from===t.to?n[t.name]=t.from:n[t.name]={from:t.from,to:t.to,speed:10,loop:!0,pingpong:"pingpong"===t.direction};return g.from(t,{frames:i,anims:n})})))}function Fe(e,t,r){return v.shaders.addLoaded(e,ot(t,r))}function Ce(e,t,r){t=y(t),r=y(r);let i=P((e=>e?ht(e):Promise.resolve(null)),"resolveUrl"),n=Promise.all([i(t),i(r)]).then((([e,t])=>ot(e,t)));return v.shaders.add(e,n)}function Ue(e,t){return t=y(t),v.sounds.add(e,"string"==typeof t?w.fromURL(t):w.fromArrayBuffer(t))}function Ne(e="bean"){return fe(e,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA1CAYAAADyMeOEAAAAAXNSR0IArs4c6QAAAoVJREFUaIHdm7txwkAQhheGAqACiCHzOKQDQrqgILpwSAeEDBnEUAF0gCMxZ7G72qce/mec2Lpf9+3unaS78wgSNZ8uX5729+d1FNWXUuGmXlBOUUEIMckEpeQJgBu6C+BSFngztBR2vd+ovY+7g+p6LbgaWgJrAeUkDYIUXgXdBBwNi6kpABJwMTQH3AZsXRR8GHTfgEth8E3gjdAUcNewpbTgY85sCMCUuOokozE0YM0YRzM9NGAAXd8+omAF5h4lnmBRvpSnZHyLoLEbaN+aKB9KWv/KWw0tAbbANnlG+UvB2dm77NxxdwgBpjrF/d7rW9cbmpvio2A5z8iAYpVU8pGZlo6/2+MSco2lHfd3rv9jAP038e1xef9o2mjvYb2OqpqKE81028/jeietlSEVO5FRWsxWsJit1G3aFpW8iWe5RwpiCZAk25QvV6nz6fIlynRGuTd5WqpJ4guAlDfVKBK87hXljflgv1ON6fV+4+5gVlA17SfeG0heKqQd4l4jI/wrmaA9N9R4ar+wpHJDZyrrfcH0nB66PqAzPi76pn+faSyJk/vzOorYhGurQrzj/P68jtBMawHaHBIR9xoD5O34dy0qQOSYHvqExq2TpT2nf76+w7y251OYF0CRaU+J920TwLUa6inx6OxE6g80lu2ux7Y2eJLF/rCXE6zEPdnenk9o+4ih9AEdnW2q81HXl5LuU6OTl2fXUhqganbXAGq3g6jJOWV/OnoesO6YqqEB/GdNsjf7uHtwj2DzmRNpp7iOZfm6D9oAxB6Yi1gC4oIYeo4MIPdopEQRB+cAko5J1tW386HpB2Kz1eop4Epdwls/kgZ1sh8gZsEjdcWkr//D8Qu3Z3l5Nl1NtAAAAABJRU5ErkJggg==")}function Le(e){return v.sprites.get(e)}function Oe(e){return v.sounds.get(e)}function Ge(e){return v.fonts.get(e)}function qe(e){return v.bitmapFonts.get(e)}function He(e){return v.shaders.get(e)}function Ke(e){return v.custom.get(e)}function Ye(e){if("string"==typeof e){let t=Le(e);if(t)return t;if(E()<1)return null;throw new Error(`Sprite not found: ${e}`)}if(e instanceof g)return nt.loaded(e);if(e instanceof nt)return e;throw new Error(`Invalid sprite: ${e}`)}function je(e){if("string"==typeof e){let t=Oe(e);if(t)return t;if(E()<1)return null;throw new Error(`Sound not found: ${e}`)}if(e instanceof w)return nt.loaded(e);if(e instanceof nt)return e;throw new Error(`Invalid sound: ${e}`)}function Qe(e){if(!e)return f.defShader;if("string"==typeof e){let t=He(e);if(t)return t.data??t;if(E()<1)return null;throw new Error(`Shader not found: ${e}`)}return e instanceof nt&&e.data?e.data:e}function ze(t){if(!t)return ze(e.font??"monospace");if("string"==typeof t){let e=qe(t),r=Ge(t);if(e)return e.data??e;if(r)return r.data??r;if(document.fonts.check(`64px ${t}`))return t;if(E()<1)return null;throw new Error(`Font not found: ${t}`)}return t instanceof nt&&t.data?t.data:t}function Je(e){return void 0!==e&&(A.masterNode.gain.value=e),A.masterNode.gain.value}function Xe(e,t={}){let r=A.ctx,i=t.paused??!1,n=r.createBufferSource(),s=new Ae,o=r.createGain(),a=t.seek??0,h=0,l=0,u=!1;n.loop=!!t.loop,n.detune.value=t.detune??0,n.playbackRate.value=t.speed??1,n.connect(o),n.onended=()=>{var e;f()>=(null==(e=n.buffer)?void 0:e.duration)&&s.trigger()},o.connect(A.masterNode),o.gain.value=t.volume??1;let d=P((e=>{n.buffer=e.buf,i||(h=r.currentTime,n.start(0,a),u=!0)}),"start"),c=je(e);c instanceof nt&&c.onLoad(d);let f=P((()=>{if(!n.buffer)return 0;let e=i?l-h:r.currentTime-h,t=n.buffer.duration;return n.loop?e%t:Math.min(e,t)}),"getTime"),p=P((e=>{let t=r.createBufferSource();return t.buffer=e.buffer,t.loop=e.loop,t.playbackRate.value=e.playbackRate.value,t.detune.value=e.detune.value,t.onended=e.onended,t.connect(o),t}),"cloneNode");return{stop(){this.paused=!0,this.seek(0)},set paused(e){if(i!==e)if(i=e,e)u&&(n.stop(),u=!1),l=r.currentTime;else{n=p(n);let e=l-h;n.start(0,e),u=!0,h=r.currentTime-e,l=0}},get paused(){return i},play(e=0){this.seek(e),this.paused=!1},seek(e){var t;(null==(t=n.buffer)?void 0:t.duration)&&(e>n.buffer.duration||(i?(n=p(n),h=l-e):(n.stop(),n=p(n),h=r.currentTime-e,n.start(0,e),u=!0,l=0)))},set speed(e){n.playbackRate.value=e},get speed(){return n.playbackRate.value},set detune(e){n.detune.value=e},get detune(){return n.detune.value},set volume(e){o.gain.value=Math.max(e,0)},get volume(){return o.gain.value},set loop(e){n.loop=e},get loop(){return n.loop},duration(){var e;return(null==(e=n.buffer)?void 0:e.duration)??0},time(){return f()%this.duration()},onEnd:e=>s.add(e),then(e){return this.onEnd(e)}}}function We(e){return Xe(A.burpSnd,e)}function rt(e,t){return new $e(c,e,t)}function ot(e=Tt,t=Pt){let r=Rt.replace("{{user}}",e??Tt),i=Mt.replace("{{user}}",t??Pt);try{return new et(c,r,i,bt.map((e=>e.name)))}catch(n){let e=/(?^\w+) SHADER ERROR: 0:(?\d+): (?.+)/,t=Ie(n).match(e),r=Number(t.groups.line)-14,i=t.groups.msg.trim(),s=t.groups.type.toLowerCase();throw new Error(`${s} shader line ${r}: ${i}`)}}function dt(e,t,r,i){let n=e.width/t,s={},o=i.split("").entries();for(let[a,h]of o)s[h]=new H(a%n*t,Math.floor(a/n)*r,t,r);return{tex:e,map:s,size:r}}function ct(e,t,r,i=f.defTex,n=f.defShader,s={}){let o=Qe(n);if(!o||o instanceof nt)return;let a=f.fixed||r?f.transform:V.cam.transform.mult(f.transform),h=[];for(let l of e){let e=Ut(a.multVec2(l.pos));h.push(e.x,e.y,l.uv.x,l.uv.y,l.color.r/255,l.color.g/255,l.color.b/255,l.opacity)}f.renderer.push(d.TRIANGLES,h,t,o,i,s)}function ft(){f.renderer.flush()}function pt(){d.clear(d.COLOR_BUFFER_BIT),f.frameBuffer.bind(),d.clear(d.COLOR_BUFFER_BIT),f.bgColor||nr((()=>{Kt({width:cr(),height:fr(),quad:new H(0,0,cr()/64,fr()/64),tex:f.bgTex,fixed:!0})})),f.renderer.numDraws=0,f.fixed=!1,f.transformStack.length=0,f.transform=new Y}function gt(e,t){f.postShader=e,f.postShaderUniform=t??null}function Ct(){ft(),f.lastDrawCalls=f.renderer.numDraws,f.frameBuffer.unbind(),d.viewport(0,0,d.drawingBufferWidth,d.drawingBufferHeight);let e=f.width,t=f.height;f.width=d.drawingBufferWidth/o,f.height=d.drawingBufferHeight/o,Yt({flipY:!0,tex:f.frameBuffer.tex,pos:new N(f.viewport.x,f.viewport.y),width:f.viewport.width,height:f.viewport.height,shader:f.postShader,uniform:"function"==typeof f.postShaderUniform?f.postShaderUniform():f.postShaderUniform,fixed:!0}),ft(),f.width=e,f.height=t}function Ut(e){return new N(e.x/cr()*2-1,-e.y/fr()*2+1)}function Nt(e){f.transform=e.clone()}function Lt(...e){if(void 0===e[0])return;let t=L(...e);0===t.x&&0===t.y||f.transform.translate(t)}function Ot(...e){if(void 0===e[0])return;let t=L(...e);1===t.x&&1===t.y||f.transform.scale(t)}function Gt(e){e&&f.transform.rotate(e)}function qt(){f.transformStack.push(f.transform.clone())}function Ht(){f.transformStack.length>0&&(f.transform=f.transformStack.pop())}function Kt(e){if(void 0===e.width||void 0===e.height)throw new Error('drawUVQuad() requires property "width" and "height".');if(e.width<=0||e.height<=0)return;let t=e.width,r=e.height,i=kt(e.anchor||yt).scale(new N(t,r).scale(-.5)),n=e.quad||new H(0,0,1,1),s=e.color||G(255,255,255),o=e.opacity??1,a=e.tex?.1/e.tex.width:0,h=e.tex?.1/e.tex.height:0,l=n.x+a,u=n.y+h,d=n.w-2*a,c=n.h-2*h;qt(),Lt(e.pos),Gt(e.angle),Ot(e.scale),Lt(i),ct([{pos:new N(-t/2,r/2),uv:new N(e.flipX?l+d:l,e.flipY?u:u+c),color:s,opacity:o},{pos:new N(-t/2,-r/2),uv:new N(e.flipX?l+d:l,e.flipY?u+c:u),color:s,opacity:o},{pos:new N(t/2,-r/2),uv:new N(e.flipX?l:l+d,e.flipY?u+c:u),color:s,opacity:o},{pos:new N(t/2,r/2),uv:new N(e.flipX?l:l+d,e.flipY?u:u+c),color:s,opacity:o}],[0,1,3,1,2,3],e.fixed,e.tex,e.shader,e.uniform),Ht()}function Yt(e){if(!e.tex)throw new Error('drawTexture() requires property "tex".');let t=e.quad??new H(0,0,1,1),r=e.tex.width*t.w,i=e.tex.height*t.h,n=new N(1);if(e.tiled){let s=Math.ceil((e.width||r)/r),o=Math.ceil((e.height||i)/i),a=kt(e.anchor||yt).add(new N(1,1)).scale(.5).scale(s*r,o*i);for(let h=0;h({pos:new N(t.x,t.y),uv:new N(0),color:e.color??O.WHITE,opacity:e.opacity??1}))),[0,1,3,1,2,3],e.fixed,f.defTex,e.shader,e.uniform)}function Xt(e){let t=e.pts;if(!t)throw new Error('drawLines() requires property "pts".');if(!(t.length<2))if(e.radius&&t.length>=3){let r=t[0].sdist(t[1]);for(let e=1;e=360&&e.outline)return!1!==e.fill&&$t(Object.assign(s,{outline:null})),void $t(Object.assign(s,{pts:n.slice(1),fill:!1}));$t(s)}function $t(e){if(!e.pts)throw new Error('drawPolygon() requires property "pts".');let t=e.pts.length;if(!(t<3)){if(qt(),Lt(e.pos),Ot(e.scale),Gt(e.angle),Lt(e.offset),!1!==e.fill){let r=e.color??O.WHITE,i=e.pts.map(((t,i)=>({pos:new N(t.x,t.y),uv:new N(0,0),color:e.colors&&e.colors[i]?e.colors[i].mult(r):r,opacity:e.opacity??1}))),n=[...Array(t-2).keys()].map((e=>[0,e+1,e+2])).flat();ct(i,e.indices??n,e.fixed,f.defTex,e.shader,e.uniform)}e.outline&&Xt({pts:[...e.pts,e.pts[0]],radius:e.radius,width:e.outline.width,color:e.outline.color,join:e.outline.join,uniform:e.uniform,fixed:e.fixed,opacity:e.opacity}),Ht()}}function er(e,t,r){ft(),d.clear(d.STENCIL_BUFFER_BIT),d.enable(d.STENCIL_TEST),d.stencilFunc(d.NEVER,1,255),d.stencilOp(d.REPLACE,d.REPLACE,d.REPLACE),t(),ft(),d.stencilFunc(r,1,255),d.stencilOp(d.KEEP,d.KEEP,d.KEEP),e(),ft(),d.disable(d.STENCIL_TEST)}function tr(e,t){er(e,t,d.EQUAL)}function rr(e,t){er(e,t,d.NOTEQUAL)}function ir(){return(f.viewport.width+f.viewport.height)/(f.width+f.height)}function nr(e){ft();let t=f.width,r=f.height;f.width=f.viewport.width,f.height=f.viewport.height,e(),ft(),f.width=t,f.height=r}function sr(e,t){t.pos&&(e.pos=e.pos.add(t.pos)),t.scale&&(e.scale=e.scale.scale(L(t.scale))),t.angle&&(e.angle+=t.angle),t.color&&1===e.ch.length&&(e.color=e.color.mult(t.color)),t.opacity&&(e.opacity*=t.opacity)}P(B,"loadFont"),P(Q,"loadBitmapFont"),P(J,"slice"),P(te,"loadSpriteAtlas"),P(ae,"createSpriteSheet"),P(fe,"loadSprite"),P(ye,"loadPedit"),P(Ve,"loadAseprite"),P(Fe,"loadShader"),P(Ce,"loadShaderURL"),P(Ue,"loadSound"),P(Ne,"loadBean"),P(Le,"getSprite"),P(Oe,"getSound"),P(Ge,"getFont"),P(qe,"getBitmapFont"),P(He,"getShader"),P(Ke,"getAsset"),P(Ye,"resolveSprite"),P(je,"resolveSound"),P(Qe,"resolveShader"),P(ze,"resolveFont"),P(Je,"volume"),P(Xe,"play"),P(We,"burp"),P(rt,"makeCanvas"),P(ot,"makeShader"),P(dt,"makeFont"),P(ct,"drawRaw"),P(ft,"flush"),P(pt,"frameStart"),P(gt,"usePostEffect"),P(Ct,"frameEnd"),P(Ut,"screen2ndc"),P(Nt,"pushMatrix"),P(Lt,"pushTranslate"),P(Ot,"pushScale"),P(Gt,"pushRotate"),P(qt,"pushTransform"),P(Ht,"popTransform"),P(Kt,"drawUVQuad"),P(Yt,"drawTexture"),P(jt,"drawSprite"),P(Qt,"getArcPts"),P(zt,"drawRect"),P(Jt,"drawLine"),P(Xt,"drawLines"),P(Wt,"drawTriangle"),P(Zt,"drawCircle"),P(_t,"drawEllipse"),P($t,"drawPolygon"),P(er,"drawStenciled"),P(tr,"drawMasked"),P(rr,"drawSubtracted"),P(ir,"getViewportScale"),P(nr,"drawUnscaled"),P(sr,"applyCharTransform");let or=/\[(? +
+
+

Tap/Click around to move

+ + +
+ +
+ + diff --git a/dist/map.json b/dist/map.json new file mode 100644 index 0000000..48ffdb6 --- /dev/null +++ b/dist/map.json @@ -0,0 +1,388 @@ +{ "compressionlevel":-1, + "height":13, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 27, 28, 28, 28, 28, 28, 29, 0, 0, 0, 27, 28, 28, 28, 28, 28, 29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":13, + "id":1, + "name":"ground", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":27, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":13, + "id":3, + "name":"props", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":27, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":4, + "name":"boundaries", + "objects":[ + { + "height":48, + "id":1, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":48, + "y":64 + }, + { + "height":16, + "id":2, + "name":"exit", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":32, + "y":112 + }, + { + "height":32, + "id":3, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":48, + "y":128 + }, + { + "height":16, + "id":4, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":112, + "x":64, + "y":160 + }, + { + "height":15.9090909090909, + "id":5, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":48, + "x":176, + "y":144.090909090909 + }, + { + "height":15.8181818181818, + "id":6, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":208, + "y":160.181818181818 + }, + { + "height":48, + "id":8, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":208, + "y":64 + }, + { + "height":14.6363636363636, + "id":12, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":47.9090909090909, + "x":176, + "y":96 + }, + { + "height":16, + "id":13, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":112, + "x":224, + "y":64 + }, + { + "height":80.0909090909091, + "id":14, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":336, + "y":95.9090909090909 + }, + { + "height":16, + "id":15, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":112, + "x":224, + "y":176 + }, + { + "height":16, + "id":16, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":47.7840909090909, + "x":64, + "y":64 + }, + { + "height":32, + "id":17, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":48, + "y":80 + }, + { + "height":16, + "id":19, + "name":"bed", + "rotation":0, + "type":"", + "visible":true, + "width":32, + "x":304, + "y":80 + }, + { + "height":17.4119318181818, + "id":23, + "name":"sofa-table", + "rotation":0, + "type":"", + "visible":true, + "width":27.5909090909091, + "x":98.1157361660079, + "y":98.4877717391304 + }, + { + "height":23.399209486166, + "id":26, + "name":"tv", + "rotation":0, + "type":"", + "visible":true, + "width":13.7391304347826, + "x":113.130434782609, + "y":136.600790513834 + }, + { + "height":22.8125, + "id":29, + "name":"pc", + "rotation":0, + "type":"", + "visible":true, + "width":13.875, + "x":161, + "y":72.0625 + }, + { + "height":14.117527173913, + "id":30, + "name":"cs-degree", + "rotation":0, + "type":"", + "visible":true, + "width":15.125, + "x":112.375, + "y":65.375 + }, + { + "height":0.125, + "id":31, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":127.5, + "y":79.75 + }, + { + "height":15.875, + "id":32, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":32.0625, + "x":128.0625, + "y":64 + }, + { + "height":10.375, + "id":33, + "name":"resume", + "rotation":0, + "type":"", + "visible":true, + "width":14.25, + "x":225.53125, + "y":80.0625 + }, + { + "height":7.03125, + "id":34, + "name":"library", + "rotation":0, + "type":"", + "visible":true, + "width":11.75, + "x":274.125, + "y":80.125 + }, + { + "height":9.90625, + "id":35, + "name":"projects", + "rotation":0, + "type":"", + "visible":true, + "width":13.25, + "x":240.34375, + "y":80.25 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":5, + "name":"spawnpoints", + "objects":[ + { + "height":0, + "id":27, + "name":"player", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":72.5454545454545, + "y":111.818181818182 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextlayerid":6, + "nextobjectid":36, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.10.2", + "tileheight":16, + "tilesets":[ + { + "columns":39, + "firstgid":1, + "image":"spritesheet.png", + "imageheight":496, + "imagewidth":624, + "margin":0, + "name":"spritesheet", + "spacing":0, + "tilecount":1209, + "tileheight":16, + "tilewidth":16 + }], + "tilewidth":16, + "type":"map", + "version":"1.10", + "width":27 +} \ No newline at end of file diff --git a/dist/map.png b/dist/map.png new file mode 100644 index 0000000..e63c3b9 Binary files /dev/null and b/dist/map.png differ diff --git a/dist/monogram.ttf b/dist/monogram.ttf new file mode 100644 index 0000000..aceaeba Binary files /dev/null and b/dist/monogram.ttf differ diff --git a/dist/spritesheet.png b/dist/spritesheet.png new file mode 100644 index 0000000..1d59dcd Binary files /dev/null and b/dist/spritesheet.png differ