memoscan
← all memos

Memo 0x88d73184…a1a32f on Ethereum

const sOR="0x21376e43c4960ae2719cfc148c6cba7f9d87ed54880dbd9bcfa0f89f29626e34";function createRandomness(e){const o=Uint32Array.from([0,1,s=t=2,3].map((t=>parseInt(e.substr(8*t+2,8),16))));return e=>(t=o[3],o[3]=o[2],o[2]=o[1],o[1]=s=o[0],t^=t<<11,o[0]^=t^t>>>8^s>>>19,o[0]/2**32)}const R=createRandomness(tokenData.hash),R2=createRandomness(sOR),shapes={PYRAMID:"PYRAMID",SQUARE:"SQUARE",DODEC:"DODEC",SPHERE:"SPHERE"},getShape=t=>t[0]<3?t[1]<3?shapes.PYRAMID:shapes.SQUARE:t[1]<3?shapes.DODEC:shapes.SPHERE;class Shape{constructor(t,e){this.size=t,this.strokeColor="#0C191D",this.strokeWeight=width/1080*6,this.hasStroke=e,this.rotationY=0,this.rotationX=0,this.rndNum=floor(rnd(0,3.999))}draw(){noStroke(),strokeWeight(this.strokeWeight);switch(getShape(position)){case shapes.PYRAMID:this.pyramid(this.size,this.hasStroke);break;case shapes.SQUARE:this.square(this.size,this.hasStroke);break;case shapes.DODEC:this.dodecahedron(this.size,this.hasStroke);break;case shapes.SPHERE:this.sphere(this.size,this.hasStroke)}}sphere(t,e){noStroke(),e&&(push(),fill(this.strokeColor),translate(0,0,-width/10),rotateX(this.rotationX),rotateY(this.rotationY),sphere(3*t/4+this.strokeWeight,50,50),pop()),rotateX(PI/4),rotateX(this.rotationX),rotateY(PI),rotateY(this.rotationY),sphere(3*t/4,50,50)}pyramid(t,e){e&&(push(),fill(this.strokeColor),translate(0,this.strokeWeight/4,-width/2),rotateX(PI/4),rotateX(this.rotationX),rotateY(-PI/4),rotateY(this.rotationY),noStroke(),pyramidModel(t+2*this.strokeWeight,0),pop()),rotateX(PI/4),rotateX(this.rotationX),rotateY(-PI/4),rotateY(this.rotationY),pyramidModel(t,1)}square(t,e){e&&(push(),fill(this.strokeColor),translate(0,0,-width/5),rotateX(PI/4),rotateX(this.rotationX),rotateY(-PI/4),rotateY(this.rotationY),noStroke(),cubeModel(t+this.strokeWeight,0),pop()),rotateX(PI/4),rotateX(this.rotationX),rotateY(-PI/4),rotateY(this.rotationY),cubeModel(t,1)}dodecahedron(t,e){e&&(push(),fill(this.strokeColor),translate(0,0,-width/5),rotateX(PI/6),rotateX(this.rotationX),rotateY(this.rotationY),noStroke(),dodecahedronModel(t+this.strokeWeight,0),pop()),rotateX(PI/6),rotateX(this.rotationX),rotateY(this.rotationY),dodecahedronModel(t,1)}}const textures={concentrics:t=>{t.background(palette[0]),t.noStroke();const e=3*t.width/floor(rnd(20,50)),o=floor(rnd(2,5));let r=3*t.width,s=0;for(;r>0;)r-=s%2==0?e:e/o,r<0&&(r=0),push(),s%2==0?t.fill(palette[1]):t.fill(palette[0]),t.circle(0,0,r),pop(),s++},pieceMeil:t=>{t.background(palette[0]),t.fill(palette[1]),t.noStroke();const e=floor(rnd(15,30));for(let o=0;o<=e;o++)for(let r=0;r<=e;r++){const s=t.width/e*8/10,i=t.width/e*o,n=t.height/e*r;push(),t.circle(i,n,s),pop()}},bricks:t=>{t.drawingContext.setLineDash([t.width/1080*5,t.width/1080*10,t.width/1080*30,t.width/1080*10]),t.background(palette[0]),t.stroke(palette[1]),t.strokeWeight(t.width/1080*5);const e=floor(rnd(15,30)),o=e/3;for(let r=0;r<e;r++){const s=t.height/(e-1)*r,i=t.height/(e-1)*(r-1);t.line(0,s,t.width,s);for(let e=0;e<o;e++){const n=t.width/(o-1),a=n*e,h=r%2==0?0:n/2;t.line(a+h,s,a+h,i)}}},checkered:t=>{t.rectMode(CENTER),t.background(palette[0]);const e=[palette[0],palette[1]];t.strokeWeight(t.width/1080);const o=floor(rnd(5,30)),r=t.width/o;for(let s=o-1;s>=0;s--)for(let i=0;i<o;i++){t.fill(e[(s+i)%e.length]),t.stroke(e[(s+i)%e.length]),o%2==0&&s>=o/2&&i<o/2&&getShape(position)===shapes.SQUARE&&(t.fill(e[(s+i+1)%e.length]),t.stroke(e[(s+i+1)%e.length]));const n=r*s+r/2,a=r*i+r/2;t.square(n,a,r)}},zoom:t=>{t.push(),t.rectMode(CENTER),t.background(palette[0]),t.strokeWeight(t.width/1080);const e=floor(rnd(3,7)),o=floor(rnd(3,15)),r=t.width/e,s=[palette[0],palette[1]];for(let i=e-1;i>=0;i--)for(let n=0;n<e;n++){let a=(i+n)%2==0?1:0;e%2==0&&i>=e/2&&n<e/2&&getShape(position)===shapes.SQUARE&&(a=(i+n)%2==0?0:1);const h=r*i+r/2,c=r*n+r/2;for(let e=0;e<o;e++){const i=r-r/o*e;t.fill(s[(e+a)%s.length]),t.stroke(s[(e+a)%s.length]),t.square(h,c,i)}}t.pop()},zigzag:t=>{t.background(palette[0]),t.stroke(palette[1]),t.strokeCap(PROJECT),t.noFill();const e=floor(rnd(5,30)),o=t.width/e;t.strokeWeight(o/4);for(let r=-1;r<e+1;r++){t.beginShape();for(let s=-1;s<e+1;s++){const e=o*s+o/2,i=o*r+o/2;t.vertex(e-o/2,i-o/2),t.vertex(e,i+o/2),t.vertex(e+o/2,i-o/2)}t.endShape()}},lines:t=>{t.background(palette[0]),t.stroke(palette[1]),t.strokeCap(PROJECT),t.noFill();const e=floor(rnd(5,30)),o=t.width/e;t.strokeWeight(o/4);const r=rnd([1,2,3]);for(let o=0;o<=e;o++){const s=t.width/e*o;1!==r&&3!==r||t.line(0,s,t.width,s),2!==r&&3!==r||t.line(s,0,s,t.width)}},ench:t=>{t.background(palette[0]),t.stroke(palette[1]),t.strokeWeight(t.width/1080*5);const e=t.width/30,o=t.width/30,r=(s,i,n,a)=>{if(n>e&&a>o){const e=rnd(.4,.6);rnd()<.5?(t.line(s+n*e,i,s+n*e,i+a),r(s,i,n*e,a),r(s+n*e,i,n*(1-e),a)):(t.line(s,i+a*e,s+n,i+a*e),r(s,i,n,a*e),r(s,i+a*e,n,a*(1-e)))}};r(0,0,t.width,t.height)},beziers:t=>{t.background(palette[0]),t.stroke(palette[1]),t.strokeWeight(t.width/1080*6),t.noFill();const e=800*t.width/1080,o=getNoiseFunc(),r=256,s=t.width;for(let i=0;i<r;i++){const n=map(i,128,r,0,t.width),a=map(i,0,128,t.height,0),h=createVector(n,a),c=map(i,0,128,0,t.width),l=map(i,128,r,t.height,0),p=createVector(c,l),d=p5.Vector.lerp(h,p,1/3),u=p5.Vector.lerp(h,p,2/3);d.x+=map(o(d.x/e,d.y/e),0,1,-s,s),d.y+=map(o(d.y/e,d.x/e),0,1,-s,s),u.x+=map(o(u.x/e,u.y/e),0,1,-s,s),u.y+=map(o(u.y/e,u.x/e),0,1,-s,s),t.bezier(h.x,h.y,d.x,d.y,u.x,u.y,p.x,p.y)}},honeycomb:t=>{t.background(palette[0]),t.stroke(palette[1]),t.strokeWeight(t.width/1080*7),t.fill(palette[0]);const e=(e,o,r)=>{t.beginShape();for(let s=PI/2;s<5*PI/2;s+=PI/3){let i=e+cos(s)*r,n=o+sin(s)*r;t.vertex(i,n)}t.endShape(CLOSE)},o=2*floor(rnd(6,8)),r=2*o,s=1.25*width/o,i=s/2;for(let t=0;t<r;t++){const r=t*s*sqrt(3)/2;for(let n=0;n<o+1;n++)e(t%2!=0?n*s:s/2+n*s,r,i)}},qTree:t=>{t.background(palette[0]),t.stroke(palette[1]),t.strokeWeight(t.width/1080*5),t.noFill();const e=rnd(100,200),o=[];for(let r=0;r<e;r++)o.push(createVector(rnd(t.width),rnd(t.height)));const r=(t,e,o,r,s)=>s.x>t&&s.x<t+o&&s.y>e&&s.y<e+r,s=t.width/30,i=t.height/30,n=(e,a,h,c)=>{h>s&&c>i&&((t,e,s,i)=>{for(let n=0;n<o.length;n++)if(r(t,e,s,i,o[n]))return!0;return!1})(e,a,h,c)?(n(e,a,h/2,c/2),n(e+h/2,a,h/2,c/2),n(e,a+c/2,h/2,c/2),n(e+h/2,a+c/2,h/2,c/2)):t.rect(e,a,h,c,t.width/128)};n(0,0,t.width,t.height)},stars:t=>{t.background(palette[0]),t.stroke(palette[1]),rnd()<.75?t.fill(palette[1]):t.noFill(),t.strokeWeight(t.width/1080*3);const e=circlePack(t);for(let o=0;o<e.length;o++){const r=e[o];star(r.x,r.y,r.r,r.r/2,floor(rnd(5,19)),t,rnd(TWO_PI))}},trigGrid:t=>{t.background(palette[0]),t.stroke(palette[1]),t.noFill(),t.strokeWeight(t.width/1080*2);class e{constructor(t,e,o){this.x=t,this.y=e,this.size=o/2,this.getXValue=this.getTrigFunc(),this.numCurves=floor(rnd(14,20)),this.resolution=floor(rnd([rnd(4,9),rnd(20,25)]))}display(){t.push(),t.translate(this.x,this.y),t.rotate(rnd(TWO_PI));for(let e=0;e<this.numCurves;e++){t.beginShape();for(let e=0;e<TWO_PI;e+=TWO_PI/this.resolution){const o=this.getXValue(e),r=map(e,0,TWO_PI,0,this.size/1.1);t.vertex(o,r)}t.endShape(),t.rotate(TWO_PI/this.numCurves)}t.pop()}getTrigFunc(){return rnd([t=>map(Math.tanh(1/Math.exp(tan(t),3)),-1,1,-this.size/2,this.size/2),t=>map(cos(t)*cos(t),0,1,-this.size/2.2,this.size/2.2),t=>map(sin(t)*sin(t),0,1,-this.size/2,this.size/2),t=>map(sin(t)*cos(t),-1,1,-this.size,this.size),t=>map(Math.tanh(1/tan(t)),0,1,-this.size/6,this.size/6),t=>map(cos(t)*cos(t),0,1,-this.size/2.2,this.size/2.2),t=>map(Math.tanh(-1/(cos(t)*cos(t))),0,1,-this.size/6.6,this.size/6.6),t=>map(Math.exp(2.71828,cos(t)),-20,1,-this.size/6,this.size/6),t=>map(Math.exp(sin(t)*cos(t),3),0,1,-this.size/8,this.size/8)])}}const o=floor(rnd(7,10));for(let r=0;r<o+1;r++){const s=r*t.width/o;for(let r=0;r<o+1;r++){new e(s,r*t.height/o,t.width/o).display()}}},rhombus:t=>{t.background(palette[0]),t.stroke(palette[1]),t.noFill(),t.strokeWeight(t.width/1080*7);const e=floor(rnd(5,9));let o=floor(rnd(17,21));o%2==0&&o++;const r=t.width/e,s=t.height/o;for(let i=0;i<o;i++){const n=map(i,0,o,0,height);for(let a=0;a<e;a++){const h=map(a,0,e,0,width);t.push(),i%2==0?(t.translate(h,n),t.quad(0,s/2,r/2,0,r,s/2,r/2,s),0===a?(t.line(0,s/2,0,s),t.line(0,s,r/2,3*s/2),t.line(r,s/2,r,s),i===o-1&&t.line(r/2,3*s/2,r,s)):a===e-1?(t.line(r,s/2,r,s),t.line(r,s,r/2,3*s/2),i===o-1&&t.line(0,s,r/2,3*s/2)):(t.line(r,s/2,r,s),i===o-1&&(t.line(0,s,r/2,3*s/2),t.line(r/2,3*s/2,r,s)))):a!==e-1?(t.translate(h+r/2,n),t.quad(0,s/2,r/2,0,r,s/2,r/2,s),0===a&&(t.line(0,s/2,0,s),t.line(0,s/2,-r/2,s)),t.line(r,s/2,r,s)):(t.translate(h+r/2,n),t.line(0,s/2,r/2,s)),t.pop()}}},squares:t=>{t.background(palette[0]),t.stroke(palette[1]),t.noFill(),t.strokeWeight(t.width/1080*5),t.rectMode(CENTER);const e=rnd(6,16),o=e*t.height/t.width,r=t.width/e,s=r/2,i=getNoiseFunc(),n=200*t.width/1080;for(let a=0;a<e+1;a++){const h=map(a,0,e,0,t.width);for(let e=0;e<o+1;e++){const a=map(e,0,o,0,t.height),c=r+s*map(i(h/n,a/n),0,1,-1,1);t.rect(h,a,c),t.rect(h,a,r+s*rnd(-1,1))}}},diagonals:t=>{t.background(palette[0]);const e=rnd()<.5;t.stroke(palette[e?0:1]),t.fill(palette[1]),t.strokeWeight(t.width/1080*(e?6:1.5)),t.strokeCap(SQUARE);const o=rnd(24,32),r=o*t.height/t.width,s=t.width/o,i=t.height/r,n=getNoiseFunc(),a=2*t.width/1080;for(let e=0;e<r;e++){const r=i*e;for(let e=0;e<o;e++){const o=s*e;rnd()<.5||(t.beginShape(),n(o/a,r/a)<.5?(t.vertex(o,r),t.vertex(o+s,r+i),t.vertex(o+s,r+2*i),t.vertex(o,r+i)):(t.vertex(o,r+i),t.vertex(o+s,r),t.vertex(o+s,r+i),t.vertex(o,r+2*i)),t.endShape(CLOSE))}}},roundedPoly:t=>{class e{constructor(t,e,o,r){this.x=t,this.y=e,this.r=o,this.numSides=r,this.phase=rnd(TWO_PI),this.vertices=this.getVertices()}getVertices(){const t=[];for(let e=this.phase;e<TWO_PI+this.phase;e+=TWO_PI/this.numSides)t.push(createVector(this.x+this.r*cos(e),this.y+this.r*sin(e)));return t}show(){const e=createVector(this.x,this.y),o=floor(rnd(2,4));for(let t=0;t<this.vertices.length;t++){const r=this.vertices[t],s=this.vertices[t+1%this.vertices.length];for(let i=1;i<o;i++)this.vertices.splice(t,1,p5.Vector.lerp(p5.Vector.lerp(r,s,i/o),e,rnd(-.25,.75))),t++}!function(e,o){t.beginShape();for(let r=0;r<e.length;r++){const s=e[r],i=e[(r+1)%e.length],n=e[(r+2)%e.length],a=s.copy().sub(i).normalize(),h=n.copy().sub(i).normalize(),c=a.angleBetween(h),l=min(s.dist(i),n.dist(i))/2*abs(sin(c/2)),p=min(o,l),d=abs(p/sin(c/2)),u=i.copy().add(a.copy().mult(d)),w=i.copy().add(h.copy().mult(d)),g=.5523,f=u.copy().sub(a.copy().mult(2*p*g)),m=w.copy().sub(h.copy().mult(2*p*g));t.vertex(u.x,u.y),t.bezierVertex(f.x,f.y,m.x,m.y,w.x,w.y)}t.endShape(CLOSE)}(this.vertices,this.r/4)}}t.background(palette[0]),t.stroke(palette[1]),rnd()<.75?t.fill(palette[1]):t.noFill(),t.strokeWeight(t.width/1080*2.5);circlePack(t,t.width/200,t.width/20,600).forEach((t=>{new e(t.x,t.y,t.r,floor(rnd(5,9))).show()}))}};class PackCircle{constructor(t,e,o){this.growing=!0,this.x=t,this.y=e,this.r=o}edges(){return!(this.x-this.r>0&&this.x+this.r<canvas.width&&this.y-this.r>0&&this.y+this.r<canvas.height)}grow(){this.r+=canvas.width/1080}}function circlePack(t,e=t.width/40,o=t.width/10,r=400){const s=[],i=pack(t,e,o,r);return s.push(...i),s}function pack(t,e,o,r){const s=[];let i=0;for(let n=0;n<r;n++){for(let e=0;e<s.length;e++){const o=s[e];if(o.growing){for(let e=0;e<s.length;e++){const r=s[e];if(r!=o){dist(o.x,o.y,r.x,r.y)-t.width/1080<o.r+r.r&&o.growing&&(o.growing=!1)}}o.growing&&(o.growing=!o.edges()),o.growing&&o.grow()}}const r=1;let n=0;for(let a=0;a<500;a++){if(addCircle(t,s,e,o)&&(n++,i++),i===this.numCurves)return s;if(n===r)break}}return s}function addCircle(t,e,o,r){const s=rnd(o,r),i=rnd(t.width),n=rnd(t.height);let a=new PackCircle(i,n,s);for(let t=0;t<e.length;t++){const o=e[t];if(dist(a.x,a.y,o.x,o.y)<o.r+a.r){a=void 0;break}}return!!a&&(e.push(a),!0)}function getNoiseFunc(){const t=floor(rnd(8,16));return rnd([(t,e,o)=>noise(t,e,o),(e,o,r)=>ceil(noise(e,o,r)*t)/t])}const backgroundGradient=t=>{const e=t.drawingContext,o=-t.width*position[1],r=-t.height*position[0],s=t.width*(6-position[1]),i=t.height*(6-position[0]);t.push(),t.noStroke();const n=e.createLinearGradient(o,r,s,i);n.addColorStop(0,"#fcfcfc"),n.addColorStop(1,"#d1d1d1"),e.fillStyle=n,t.rect(0,0,t.width,t.height),t.pop()},backgroundElements={star:t=>{t.noStroke(),star(0,0,7*t.width/24*scaleFactor,t.width/3*scaleFactor,2*floor(rnd(12,26)),t)},circle:t=>{const e=rnd([0,rnd(PI/3,PI/2)]);rnd()<.5&&t.rotate(PI),nCircle(0,0,t.height/3*scaleFactor,100,t,e)}},easingFunctions={linear:t=>t,easeInQuad:(t,e)=>e?1-(1-t)*(1-t):t*t,easeInOutQuad:t=>t<.5?2*t*t:1-pow(-2*t+2,2)/2};function stripeElement(t){const e=rnd(),o=randomAttribute(easingFunctions,R2);let r=!1,s=!1;e<.33?r=!0:e<.66&&(s=!0);const i=t.width,n=i/2,a=n/12,h=t.height/2-12*a/2,c=(t.height-n)/2.1;let l,p;t.strokeWeight(i/1080),position[0]<3?(l=color("#b61624"),p=color("#ffcae9")):(l=color("#6ccff6"),p=color("#573280"));for(let e=0;e<12;e++){t.push();const n=lerpColor(l,p,o(e/11,position[0]>=3));t.fill(n),t.stroke(n);const d=h+e*a,u=d+a;r||s?(t.beginShape(),t.vertex(0,d),t.vertex(0,d),r?t.vertex(i/2,d-c):t.vertex(i/2,d+c),t.vertex(i,d),t.vertex(i,d),t.vertex(i,u),t.vertex(i,u),r?t.vertex(i/2,u-c):t.vertex(i/2,u+c),t.vertex(0,u),t.vertex(0,u),t.endShape(CLOSE)):t.rect(0,d,i,a),t.pop()}}function getPosition(){const t=`${tokenData.tokenId}`,e=parseInt(t.substring(t.length-4,t.length));if(e>35)throw new Error(random(errorMessages));const o=[0,0];for(let t=0;t<e;t++)o[1]++,o[1]>5&&(o[0]++,o[1]=0);return o}const bwPalette=["#0C191D","#F5F4F6"];function getPalette(){const t=[["#b61624","#ffcae9"],["#0356c9","#ffcae9"],["#573280","#ffcae9"],["#12695f","#ffcae9"],["#561643","#ffcae9"],["#f9dc5c","#b61624"],["#85ffd0","#b61624"],["#0356c9","#f9dc5c"],["#573280","#f9dc5c"],["#12695f","#f9dc5c"],["#561643","#f9dc5c"],["#85ffd0","#0356c9"],["#85ffd0","#573280"],["#6ccff6","#573280"],["#85ffd0","#12695f"],["#561643","#85ffd0"],["#6ccff6","#561643"],["#561643","#f07f42"],["#b61624","#cff186"],["#0356c9","#cff186"],["#573280","#cff186"],["#12695f","#cff186"],["#561643","#cff186"],["#573280","#f2c57c"],["#561643","#f2c57c"]],e=rnd(t),o=[];t.forEach((t=>{o.includes(t[0])||o.push(t[0]),o.includes(t[1])||o.push(t[1])})),shuffleArray(o,!0,R2);const r=o[getBgElemIndex()];if([1,4].includes(position[0])&&[1,4].includes(position[1])||[2,3].includes(position[0])&&[2,3].includes(position[1]))return shuffleArray(e,!0),e.push(r),e;const s=shuffleArray(bwPalette,!1);return s.push(r),s}function getBgElemIndex(){const t=[[1,2],[1,3],[2,1],[2,2],[2,3],[2,4],[3,1],[3,2],[3,3],[3,4],[4,2],[4,3]];for(let e=0;e<t.length;e++){const o=t[e];if(position[0]===o[0]&&position[1]===o[1])return e}}let bE,shapeTexture,shape,position,palette;const scaleFactor=1.25;function setup(){position=getPosition(),noiseSeed(seed);const t=min(windowWidth,windowHeight);createCanvas(t,t,WEBGL);let e=!1,o=!1;if(([1,4].includes(position[0])&&[2,3].includes(position[1])||[2,3].includes(position[0])&&[1,2,3,4].includes(position[1]))&&(e=!0),2!==position[0]&&3!==position[0]||(o=!0),palette=getPalette(),bE=createGraphics(width,height),bE.translate(0,bE.height),bE.scale(1,-1),backgroundGradient(bE),push(),o&&stripeElement(bE),e){const t=randomAttribute(backgroundElements);bE.stroke(palette[2]),bE.fill(palette[2]),bE.translate(bE.width/2,bE.height/2),t(bE)}pop(),shapeTexture=createGraphics(width,height);const r=randomAttribute(textures);shapeTexture.translate(0,shapeTexture.height),shapeTexture.scale(1,-1),r(shapeTexture),ortho(-width/2,width/2,height/2,-height/2,0,10*width);const s=(position[0]+position[1])%2==0;shape=new Shape(width/3*scaleFactor,s)}let mouseReleasedAt,resetDuration,easingExp,mouseDownPos=null,mouseIsPressed=!1,globalProgressX=0,globalProgressY=0;function draw(){if(texture(bE),push(),noStroke(),translate(0,0,-width),plane(width,height),pop(),push(),texture(shapeTexture),mouseIsPressed){const t=map(constrain(mouseDownPos[0]-mouseX,-width,width),-width,width,1,-1),e=map(constrain(mouseDownPos[1]-mouseY,-width,width),-width,width,1,-1);mouseDownPos=[mouseX,mouseY],globalProgressX=constrain(globalProgressX+t,-1,1),globalProgressY=constrain(globalProgressY+e,-1,1)}else if(0!==shape.rotationY||0!==shape.rotationX){const t=millis()-mouseReleasedAt,e=globalProgressX>0?max:min,o=globalProgressY>0?max:min;globalProgressX=e(lerp(globalProgressX,0,pow(t/resetDuration,easingExp)),0),globalProgressY=o(lerp(globalProgressY,0,pow(t/resetDuration,easingExp)),0)}const t=abs(globalProgressX),e=abs(globalProgressY),o=Math.sign(globalProgressX),r=Math.sign(globalProgressY);shape.rotationX=map(1-pow(1-e,5),0,1,0,PI/5)*r,shape.rotationY=map(1-pow(1-t,5),0,1,0,PI/5)*o,shape.draw(),pop()}function mousePressed(){mouseButton===LEFT&&(mouseDownPos=[mouseX,mouseY],mouseIsPressed=!0)}function mouseReleased(){mouseIsPressed=!1,mouseDownPos=null,mouseReleasedAt=millis();const t=max(abs(globalProgressX),abs(globalProgressY));resetDuration=map(t,0,1,100,1e3),easingExp=map(t,0,1,3,1.75)}function nCircle(t,e,o,r,s,i=0){s.noStroke();let n=(TWO_PI-i)/r;s.beginShape();for(let a=0;a<=r;a++){const r=n*a;let h=t+cos(r-HALF_PI+i/2)*o,c=e+sin(r-HALF_PI+i/2)*o;s.vertex(h,c)}s.endShape(CLOSE)}function star(t,e,o,r,s,i,n=0){let a=TWO_PI/s,h=a/2;i.beginShape();for(let s=n;s<TWO_PI+n;s+=a){let n=t+cos(s)*r,a=e+sin(s)*r;i.vertex(n,a),n=t+cos(s+h)*o,a=e+sin(s+h)*o,i.vertex(n,a)}i.endShape(CLOSE)}const hashPairs=[];for(let t=0;t<32;t++)hashPairs.push(tokenData.hash.slice(2+2*t,4+2*t));const decPairs=hashPairs.map((t=>parseInt(t,16))),seed=parseInt(tokenData.hash.slice(0,16),16),randomAttribute=function(t,e=R){const o=Object.keys(t);return t[o[o.length*e()<<0]]},rnd=function(t,e){const o=R();if(void 0===t)return o;if(void 0===e)return t instanceof Array?t[Math.floor(o*t.length)]:o*t;if(t>e){const o=t;t=e,e=o}return o*(e-t)+t};function shuffleArray(t,e,o=R){const r=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t);let s,i,n=(t=e||r?t:t.slice()).length;for(;n>1;)s=o(0,1)*n|0,i=t[--n],t[n]=t[s],t[s]=i;return t}const pyramidModel=(t,e)=>{const o=[new p5.Vector(0,1.2*t,0),new p5.Vector(t/2,-t/2,t/2),new p5.Vector(-t/2,-t/2,t/2),new p5.Vector(0,1.2*t,0),new p5.Vector(t/2,-t/2,-t/2),new p5.Vector(t/2,-t/2,t/2),new p5.Vector(0,1.2*t,0),new p5.Vector(-t/2,-t/2,t/2),new p5.Vector(-t/2,-t/2,-t/2),new p5.Vector(0,1.2*t,0),new p5.Vector(t/2,-t/2,-t/2),new p5.Vector(-t/2,-t/2,-t/2)],r=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],s=[.25,1,.5,0,0,0,.75,1,1,0,.5,0,.75,1,1,0,.5,0,.25,1,.5,0,0,0],i=new p5.Geometry(1,1,(function(){this.strokeIndices=[[0,1],[2,3],[3,4],[8,9]],o.map((t=>{this.vertices.push(t)})),this.faces=r,this.uvs=s}));i.gid=e,i.computeNormals(),model(i)},cubeModel=(t,e)=>{const o=[new p5.Vector(-t/2,-t/2,t/2),new p5.Vector(t/2,-t/2,t/2),new p5.Vector(t/2,t/2,t/2),new p5.Vector(-t/2,t/2,t/2),new p5.Vector(-t/2,t/2,-t/2),new p5.Vector(-t/2,t/2,t/2),new p5.Vector(t/2,t/2,t/2),new p5.Vector(t/2,t/2,-t/2),new p5.Vector(t/2,-t/2,-t/2),new p5.Vector(t/2,t/2,-t/2),new p5.Vector(t/2,t/2,t/2),new p5.Vector(t/2,-t/2,t/2)],r=[[0,1,2],[0,2,3],[4,5,6],[4,6,7],[8,9,10],[8,10,11]],s=[0,0,.5,0,.5,.5,0,.5,0,1,0,.5,.5,.5,.5,1,1,0,1,.5,.5,.5,.5,0],i=new p5.Geometry(1,1,(function(){this.strokeIndices=[[1,2],[2,3],[2,7]],o.map((t=>{this.vertices.push(t)})),this.faces=r,this.uvs=s}));i.gid=e,i.computeNormals(),model(i)},dodecahedronModel=(t,e)=>{const o=(1+sqrt(5))/2,r=.5,s=.5/o,i=.5*(2-o);let n=[new p5.Vector(s,s,s),new p5.Vector(0,r,i),new p5.Vector(-s,s,s),new p5.Vector(-i,0,r),new p5.Vector(i,0,r),new p5.Vector(-s,-s,s),new p5.Vector(0,-r,i),new p5.Vector(s,-s,s),new p5.Vector(i,0,r),new p5.Vector(-i,0,r),new p5.Vector(s,-s,-s),new p5.Vector(0,-r,-i),new p5.Vector(-s,-s,-s),new p5.Vector(-i,0,-r),new p5.Vector(i,0,-r),new p5.Vector(-s,s,-s),new p5.Vector(0,r,-i),new p5.Vector(s,s,-s),new p5.Vector(i,0,-r),new p5.Vector(-i,0,-r),new p5.Vector(0,r,-i),new p5.Vector(0,r,i),new p5.Vector(s,s,s),new p5.Vector(r,i,0),new p5.Vector(s,s,-s),new p5.Vector(0,r,i),new p5.Vector(0,r,-i),new p5.Vector(-s,s,-s),new p5.Vector(-r,i,0),new p5.Vector(-s,s,s),new p5.Vector(0,-r,-i),new p5.Vector(0,-r,i),new p5.Vector(-s,-s,s),new p5.Vector(-r,-i,0),new p5.Vector(-s,-s,-s),new p5.Vector(0,-r,i),new p5.Vector(0,-r,-i),new p5.Vector(s,-s,-s),new p5.Vector(r,-i,0),new p5.Vector(s,-s,s),new p5.Vector(s,s,s),new p5.Vector(i,0,r),new p5.Vector(s,-s,s),new p5.Vector(r,-i,0),new p5.Vector(r,i,0),new p5.Vector(s,-s,-s),new p5.Vector(i,0,-r),new p5.Vector(s,s,-s),new p5.Vector(r,i,0),new p5.Vector(r,-i,0),new p5.Vector(-s,s,-s),new p5.Vector(-i,0,-r),new p5.Vector(-s,-s,-s),new p5.Vector(-r,-i,0),new p5.Vector(-r,i,0),new p5.Vector(-s,-s,s),new p5.Vector(-i,0,r),new p5.Vector(-s,s,s),new p5.Vector(-r,i,0),new p5.Vector(-r,-i,0)];n=n.map((e=>e.normalize().mult(t/1.2)));const a=[[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14],[15,16,17,18,19],[20,21,22,23,24],[25,26,27,28,29],[30,31,32,33,34],[35,36,37,38,39],[40,41,42,43,44],[45,46,47,48,49],[50,51,52,53,54],[55,56,57,58,59]],h=[];for(let t=0;t<a.length;t++){const e=a[t];h.push([e[0],e[1],e[2]]),h.push([e[2],e[0],e[3]]),h.push([e[3],e[4],e[0]])}const c=[[4,3],[4,0],[4,7],[3,2],[3,5],[2,1],[2,28],[1,0],[1,16],[0,23],[7,6],[7,38],[6,5],[6,11],[5,33],[14,13],[14,10],[14,17],[13,12],[13,15],[12,11],[12,33],[11,10],[10,38],[17,16],[17,23],[16,15],[15,28],[23,38],[28,33]],l=.5/(sqrt(5+2*sqrt(5))/2),p=l*o,d=sqrt(pow(l,2)*sqrt(25+10*sqrt(5))/(5*sqrt((5+sqrt(5))/2))),u=[],w=a.length;for(let t=0;t<w;t++){const t=.5+p/3*rnd(-1,1),e=.5+p/3*rnd(-1,1),o=rnd(TWO_PI);for(let r=0;r<5;r++){const s=t+d*cos(TWO_PI*(r%5)/5+o)*1.15,i=e+d*sin(TWO_PI*(r%5)/5+o)*1.15;u.push(s,i)}}const g=new p5.Geometry(1,1,(function(){n.map((t=>{this.vertices.push(t)})),this.faces=h,this.uvs=u,this.strokeIndices=c}));g.gid=e,g.computeNormals(),model(g)},errorMessages=['"Art is anything you can get away with." - Andy Warhol','"Everything that is contradictory creates life." - Salvador Dali','"Computers are useless. They can only give you answers." - Pablo Picasso','"I am just another dot in the world." - Yayoi Kusama','"You have to step over the boundaries sometimes just to find out where they are." - Damien Hirst','"In terms of existing, everything is equal." - Donald Judd','"Nothing is important... so everything is important." - Keith Haring','"MIND THE SCAMS!!!" - DALEK','"Less is only more where more is no good." - Frank Lloyd Wright',"\"I love computer programmers. They have a very beautiful definition of complexity as 'the capacity to transmit the maximum information with the minimum data'.\" - Bjarke Ingels",'"By withholding most of the program output, the artist could present a particular, limited view of the algorithm." - Tyler Hobbs','"There can be no avant-garde because everything has been done." - Pedro Friedeberg'];