0x6f737253…175bsent to0x0a1bbd57…3676·#16,930,535·view on Etherscan
555:(t,n,s)=>{const i=s(937);var e;function r(t){const n=Math.round(Math.min(255,Math.max(0,t))).toString(16);return 1==n.length?"0"+n:n}function h(t,n,s){const i=Math.sin(s),e=Math.cos(s);return[t*e-n*i,t*i+n*e]}function o(t){const n=Math.floor(t[0]/S);if(n<0||n>=BLOCKS.length)return null;const s=Math.floor(t[1]/S);if(s<0||s>=BLOCKS[n].length)return null;const i=Math.floor((t[2]+Z)/S);if(i<0||i>=BLOCKS[n][s].length)return null;const e=BLOCKS[n][s][i];return e.isEmpty?null:e}function a(t,n,s,i,e,r,h){return!(t[0]<n-.01)&&(!(t[1]<i-.01)&&(!(t[2]<r-.01)&&(!(t[0]>s+.01)&&(!(t[1]>e+.01)&&!(t[2]>h+.01)))))}function l(t,n,s,i){const e=d(i,n);if(Math.abs(e)<=1e-4)return[0,0,0,!1,-10];const r=d([t[0]-s[0],t[1]-s[1],t[2]-s[2]],n)/e;return[s[0]+r*i[0],s[1]+r*i[1],s[2]+r*i[2],!0,r]}function d(t,n){const s=Math.min(t.length,n.length);let i=0;for(let e=0;e<s;e++)i+=t[e]*n[e];return i}function c(t,n,s,i){const e=h(t,n,i);return[e[0],e[1],s]}function u(t,n,s,i,e){let r=function(t,n,s,i){const e=h(n,s,i);return[t,e[0],e[1]]}(t,n,s,i);return c(r[0],r[1],r[2],e)}function f(t,n,s){return[t[0]+s*n[0],t[1]+s*n[1],t[2]+s*n[2]]}function M(t,n,s){const i=[];for(let e=0;e<Math.min(3,t.length);e++)i.push(t[e]+s*(n[e]-t[e]));return i}t.exports={SetSimplex:function(t){e=t},noise:function(t,n,s,i){return Math.round(1e3*e(Math.round(1e3*i*t)/1e3,Math.round(1e3*i*n)/1e3,Math.round(1e3*i*s)/1e3))/1e3},Distance:function(t,n){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))},GetBlock:o,RayPlane:l,IsVis:function(t,n,s){return DMAP.ReadN(t[0]/n,(s-t[1])/s)>t[2]-.1},normalize:function(t){let n=t[0],s=t[1],i=t[2];const e=Math.sqrt(n*n+s*s+i*i);return e>.001?(n/=e,s/=e,i/=e,[n,s,i]):[0,0,0]},clamp:function(t,n){let s=t[0],i=t[1],e=t[2];const r=Math.sqrt(s*s+i*i+e*e);return r>n?(s*=n/r,i*=n/r,e*=n/r,[s,i,e]):[s,i,e]},CrossProduct:function(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]},lerp:M,IsFrame:function(t,n,s,i,e,r){return t*e<FRAME+r-e||n*e<FRAME+r-e||t*e>=s*e-FRAME-r||n*e>=i*e-FRAME-r},Rotate:h,RotateZ:c,RotateXZ:u,addVec:f,hashColor:function(t){return"#"+r(t[0])+r(t[1])+r(t[2])+r(255*t[3])},getColorIndices:function(t,n,s,i,e){let r=4*s*(i-1-n-e)+4*t;return[r,r+1,r+2,r+3]},Trace:function(t,n,s,i,e){let r=0;r=n[0]>=0?Math.max(Math.floor((t[0]+.001)/S)*S,0):Math.max(0,Math.floor((t[0]+.001-s)/S)*S);let h=0;if(h=n[0]<=0?Math.min(Math.ceil((t[0]-.001)/S)*S,T):Math.min(T,Math.ceil((t[0]-.001+s)/S)*S),h-r<=.001)return null;let d=0;d=n[1]>=0?Math.max(Math.floor((t[1]+.001)/S)*S,0):Math.max(0,Math.floor((t[1]+.001-s)/S)*S);let c=0;if(c=n[1]<=0?Math.min(Math.ceil((t[1]-.001)/S)*S,T):Math.min(T,Math.ceil((t[1]-.001+s)/S)*S),c-d<=.001)return null;let u=0;u=n[2]>=0?Math.max(Math.floor((t[2]+.001)/S)*S,-Z):Math.max(-Z,Math.floor((t[2]+.001-s)/S)*S);let f=0;if(f=n[2]<=0?Math.min(Math.ceil((t[2]-.001)/S)*S,U):Math.min(U,Math.ceil((t[2]-.001+s)/S)*S),f-u<=.001)return null;const p=new Array;i&&p.push([t[0],t[1],t[2],!0,-1]);for(let s=d;s<c+1;s+=c-d){const i=l([0,s,0],[0,-1,0],t,n);i[3]&&(i[4]<=0||a(i,r,h,d,c,u,f)&&p.push(i))}for(let s=r;s<h+1;s+=h-r){const i=l([s,0,0],[-1,0,0],t,n);i[3]&&(i[4]<=0||a(i,r,h,d,c,u,f)&&p.push(i))}for(let s=u;s<f+1;s+=f-u){const i=l([0,0,s],[0,0,1],t,n);i[3]&&(i[4]<=0||a(i,r,h,d,c,u,f)&&p.push(i))}if(p.length<2)return null;let g=9999,m=-9999,C=9999,R=-9999,x=9999,y=-9999;for(let t=0;t<p.length;t++){const n=p[t][0],s=p[t][1],i=p[t][2];g>n&&(g=n),C>s&&(C=s),x>i&&(x=i),m<n&&(m=n),R<s&&(R=s),y<i&&(y=i)}g=Math.floor((g+.01)/S)*S,C=Math.floor((C+.01)/S)*S,x=Math.floor((x+.01)/S)*S,m=Math.ceil((m-.01)/S)*S,R=Math.ceil((R-.01)/S)*S,y=Math.ceil((y-.01)/S)*S;const w=new Array;for(let t=0;t<p.length;t++)w.push(p[t]);for(let i=C;i<R+1;i+=S){if(i==d||i==c)continue;const e=l([0,i,0],[0,-1,0],t,n);e[3]&&(e[4]<=0||e[4]>s||a(e,g,m,C,R,x,y)&&w.push(e))}for(let i=g;i<m+1;i+=S){if(i==r||i==h)continue;const e=l([i,0,0],[-1,0,0],t,n);e[3]&&(e[4]<=0||e[4]>s||a(e,g,m,C,R,x,y)&&w.push(e))}for(let i=x;i<y+1;i+=S){if(i==u||i==f)continue;const e=l([0,0,i],[0,0,1],t,n);e[3]&&(e[4]<=0||e[4]>s||a(e,g,m,C,R,x,y)&&w.push(e))}if(w.length<2)return null;w.sort((function(t,n){return t[4]-n[4]}));for(let t=0;t<w.length-1;t++){const n=o(M(w[t],w[t+1],.5));if(null!=n){const s=n.Intersect(w[t],w[t+1],e,w[t][4]);if(null!=s)return s}}return null},Diag:function(t,n,s,i){if(BLOCKS[t+i[0]][n+i[1]][s+i[2]].isEmpty)return!1;for(let e=0;e<i.length;e++){const r=[i[0],i[1],i[2]];for(let t=0;t<r.length;t++)e!=t&&(r[t]=0);if((0!=r[0]||0!=r[1]||0!=r[2])&&!BLOCKS[t+r[0]][n+r[1]][s+r[2]].isEmpty)return!1}return!0},myRandom:class{constructor(t){this.rng=new i.impl(t)}rnd(){return this.rng.double()}},Camera:class{constructor(t,n,s,i,e){this.planeO=[t,n,s],this.planeX=u(1,0,0,i,e),this.planeY=u(0,1,0,i,e),this.planeZ=u(0,0,1,i,e)}MoveBack(t){this.planeO=f(this.planeO,this.planeZ,t)}GetVector(){return[-this.planeZ[0],-this.planeZ[1],-this.planeZ[2]]}ScreenP(t,n,s,i){const e=[t[0]-this.planeO[0],t[1]-this.planeO[1],t[2]-this.planeO[2]];return[s/2+d(e,this.planeX)/n,i/2-d(e,this.planeY)/(n*SQUEEZE),-d(e,this.planeZ)]}}}}},n={};function s(i){var e=n[i];if(void 0!==e)return e.exports;var r=n[i]={exports:{}};return t[i](r,r.exports,s),r.exports}s.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return s.d(n,{a:n}),n},s.d=(t,n)=>{for(var i in n)s.o(n,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),(()=>{var t=s(824),n=s(80),i=s(558),e=s(569),r=s(374),h=s(413),o=s(479),a=s(555);try{0==parseInt(tokenData.tokenId)%1e6&&(tokenData.hash="0xa313d17667adeec2cb2d6f2ec328af6e1db15588c007cbd95bca700bcf1e317f"),console.log("Seed: "+tokenData.hash)}catch{}s.g.R=new t.Random,s.g.U=80,s.g.S=8,s.g.T=392,s.g.D=1.5,s.g.Z=S,s.g.TERCHANGE=R.random_dec()<.6,s.g.FLATTEN=R.random_dec()<.4,s.g.STRIPES=Math.round(R.random_dec()),s.g.MILL=R.random_dec()>.36,MILL||(s.g.TERCHANGE=!0);const l=[["graphite",[45,48,53],[214,196,188]],["crimson",[75,43,43],[255,204,185]],["goldblack",[65,62,54],[226,193,142]],["blackAndWhite",[48,48,48],[230,230,230]],["darkgreen",[48,60,58],[203,197,196]],["sepia",[64,57,47],[255,229,192]]];let d=Math.min(l.length-1,Math.max(0,Math.floor(.99*l.length*R.random_dec())));l[d][0];s.g.TERCLR=l[d][1],s.g.CUTCLR=l[d][2];try{document.body.style.backgroundColor="#000000"}catch{}s.g.CAMTYPE=Math.max(0,Math.floor(1.4*R.random_dec())),s.g.FRAME=2,s.g.XYtype=Math.round(R.random_dec()),s.g.Ztype=Math.round(R.random_dec()),s.g.GRID=R.random_dec()>.35,s.g.SMGRID=R.random_dec()>.35;let c=0;const u=R.random_dec();c=0==CAMTYPE?u<.5?.4-1.1*u:-.35-1.1*(u-.5):.33-1.17*u,c>=0&&c<.1&&(c=.1),c<0&&c>-.1&&(c=-.1),c>=-.5&&c<-.4&&(c=-.4),c<-.5&&c>-.6&&(c=-.6),s.g.LV=(0,a.RotateXZ)(0,1,0,.29,c*Math.PI);let f=Math.PI/4,M=-Math.PI/4;s.g.IMG=88*Math.SQRT2,s.g.SQUEEZE=1,1==CAMTYPE&&(s.g.IMG=112,M=0,s.g.SQUEEZE=.99),s.g.FRAME=FRAME*IMG/128,s.g.SQUEEZE*=(-2*FRAME+16*(IMG+2*FRAME)/9)/(16*IMG/9),s.g.IMG+=2*FRAME,s.g.CAM=new a.Camera(-S/2+T/2,S/2+T/2,0,f,M),CAM.MoveBack(500),s.g.landscape=null,s.g.DMAP=null,s.g.BLOCKS=new Array;let p=!1;for(;!p;)try{(0,a.SetSimplex)((0,h.makeNoise3D)(Math.round(1e4*R.random_dec())));const t=Math.round(1e3*(.02+.05*R.random_dec()))/1e3,o=Math.round(1e5*R.random_dec())/1e3,l=Math.round(1e3*(.02+.05*R.random_dec()))/1e3,d=Math.round(1e5*R.random_dec())/1e3;s.g.landscape=new r.Mountain(l,d,t,o),s.g.BLOCKS=new Array;for(let t=0;t<T-S;t+=S){const s=new Array;for(let i=0;i<T-S;i+=S){const e=new Array;for(let s=-Z;s<U;s+=S)e.push(new n.BBlock(t,i,s,S));s.push(e)}BLOCKS.push(s)}const c=1-Math.round(R.random_dec()),u=R.random_dec()<.5;if((0,i.GrowBoxes)([(5+(u?c:0))*S,(5+(u?0:c))*S,4*S]),(0,i.ClearBoxes)(),!MILL)for(let t of BLOCKS)for(let n of t)for(let t of n)t.isEmpty&&(t.isEmpty=!1,t.terrain=1);let f=!0,M=0;for(;f&&M<1e3;){f=!1;for(let t of BLOCKS)for(let n of t)for(let t=0;t<n.length;t++)0==M&&n[t].Resolve(),n[t].isEmpty||n[t].hasTerrain&&n[t].isThin&&0!=t&&(n[t-1].isEmpty||n[t-1].isFlat||n[t].terrain!=n[t-1].terrain&&n[t-1].hasTerrain)&&(n[t].isEmpty=!0,f=!0);for(let t=1;t<BLOCKS.length-1;t++)for(let n=1;n<BLOCKS[t].length-1;n++)for(let s=1;s<BLOCKS[t][n].length-1;s++)BLOCKS[t][n][s].isEmpty||BLOCKS[t][n][s].isTip||((0,a.Diag)(t,n,s,[1,1,0])||(0,a.Diag)(t,n,s,[1,-1,0])||(0,a.Diag)(t,n,s,[1,0,1])||(0,a.Diag)(t,n,s,[1,0,-1])||(0,a.Diag)(t,n,s,[0,1,1])||(0,a.Diag)(t,n,s,[0,1,-1]))&&(f=!0,BLOCKS[t][n][s].isEmpty=!0);M++}let g=new Array;for(let t of BLOCKS)for(let n of t)n[0].isEmpty||(g.push(n[0]),n[0].visited=!0);for(M=0;g.length>0&&M<1e3;){const t=new Array;for(let n of g){const s=n.GetNeigh();for(let n of s)t.push(n)}g=t,M++}for(let t of BLOCKS)for(let n of t)for(let t of n)t.visited||(t.isEmpty=!0);landscape.CalculateLight();for(let t=0;t<BLOCKS.length;t++)for(let s=0;s<BLOCKS[t].length;s++)for(let i=0;i<BLOCKS[t][s].length;i++)BLOCKS[t][s][i].isEmpty?0!=i&&(BLOCKS[t][s][i-1].isEmpty||BLOCKS[t][s][i-1].hasTerrain)||(BLOCKS[t][s][i].roof=!0):(t>0&&(0,n.Continous)(BLOCKS[t-1][s][i],BLOCKS[t][s][i])&&(BLOCKS[t][s][i].contX=!0),s>0&&(0,n.Continous)(BLOCKS[t][s-1][i],BLOCKS[t][s][i])&&(BLOCKS[t][s][i].contY=!0),(0==t||t>0&&BLOCKS[t-1][s][i].isEmpty)&&(BLOCKS[t][s][i].winX=!0),(0==s||s>0&&BLOCKS[t][s-1][i].isEmpty)&&(BLOCKS[t][s][i].winY=!0),i<BLOCKS[t][s].length-1&&(0,n.Continous)(BLOCKS[t][s][i],BLOCKS[t][s][i+1])&&(BLOCKS[t][s][i].contZ=!0));(0,e.SetUpEffects)(),p=!0;break}catch(t){p=!1,console.log("problem. repeating.")}let g=0,m=4,C=self.innerWidth,x=self.innerHeight;try{const t=new URLSearchParams(window.location.search),n=t.get("h"),s=t.get("w");n&&(x=parseInt(n),console.log("set H to "+x)),s&&(C=parseInt(s),console.log("set W to "+C))}catch{C=self.innerWidth,x=self.innerHeight}const y=document.createElement("canvas");y.id="sumCanvas",y.style.maxWidth="100%",y.style.maxHeight="100%",y.style.zIndex=999,s.g.birdCtx=y.getContext("2d"),document.body.prepend(y),s.g.mainCanvas=document.createElement("canvas"),mainCanvas.id="mainCanvas",mainCanvas.style.display="none",s.g.mainCtx=mainCanvas.getContext("2d",{willReadFrequently:!0}),document.body.prepend(mainCanvas),function(t,n){let i=Math.min(18*Math.ceil(t/18),18*Math.ceil(n/32));i=18*Math.ceil(Math.max(90,i,Math.min(900,3*i))/18);let e=Math.round(16*i/9);console.log("best size for w="+t+", h="+n+" is "+i+"x"+e),mainCanvas.width=Math.round(i),mainCanvas.height=Math.round(e),y.width=mainCanvas.width,y.height=mainCanvas.height,g=0,m=4*Math.min(20,Math.round(Math.max(1,3200/Math.max(1,mainCanvas.height)))),s.g.DMAP=new r.Array2D(Math.min(mainCanvas.width,900),Math.min(mainCanvas.height,1600),0)}(C,x),setInterval((function(){!function(){const t=IMG/Math.max(1,mainCanvas.width);if(g<m){if((0,o.renderLight)(g,5e3,t,mainCanvas.width,mainCanvas.height),0==g)try{for(let n=0;n<100;n++)(0,e.RenderBirds)(t,mainCanvas.width,mainCanvas.height)}catch{}if(3==g)try{(0,e.SetUpPeople)(t,mainCanvas.width,mainCanvas.height)}catch{}}birdCtx.drawImage(mainCanvas,0,0);try{if(g>3&&(0,e.RenderBirds)(t,mainCanvas.width,mainCanvas.height),g<m){birdCtx.fillStyle=(0,a.hashColor)([CUTCLR[0]+.5*(255-CUTCLR[0]),CUTCLR[1]+.5*(255-CUTCLR[1]),CUTCLR[2]+.5*(255-CUTCLR[2]),1]),birdCtx.beginPath(),birdCtx.arc(mainCanvas.width/2,mainCanvas.height/2,mainCanvas.width/16,0,2*Math.PI),birdCtx.fill(),birdCtx.fillStyle=(0,a.hashColor)([TERCLR[0],TERCLR[1],TERCLR[2],.9]);let t=Math.round(100*(g+1)/m)+"%";birdCtx.font=.031*mainCanvas.width+"px monospace",birdCtx.textAlign="center",birdCtx.textBaseline="ideographic",birdCtx.fillText(t,.499*mainCanvas.width,.015*mainCanvas.width+mainCanvas.height/2)}}catch{}g++,g>1e4&&(g=1e4)}()}),80)})()})();