memoscan
← all memos

Memo 0xed063bdf…b29d9f on Ethereum

is.miniCircle&&(this.p.fill(this.thirdColor),this.p.circle(this.x,this.y,this.size/2,this.size/2)),this.p.pop()}}var g=a;let k;const w=new URLSearchParams(window.location.search),y=Object.fromEntries(w.entries());let S,C;const m=1;let v,b,F,z,E,x,W,D;1*window.innerHeight>=window.innerWidth?(S=window.innerWidth,C=window.innerWidth/1):(C=window.innerHeight,S=1*window.innerHeight);const{rnd:M,rangeFloor:A,pick:P,weighted:B}=e(tokenData.hash),calculateFeatures=()=>{const t={},e=A(s.length);t.palette=s[e],t.grid=[2,3,4,5,6][B([.05,.5,1,1,.2])],t.shapes=["min","mid","max"][B([1,.5,.3])];const i=M()>.95&&P([1,2]);return t.doubleStrokes=1===i,t.tripleStrokes=2===i,t.zoomed="min"!==t.shapes&&M()>.99,t.bundle=M()>.98,t.spirals=M()>.995,t.simple=M()>.9,t.miniature=!t.zoomed&&M()>.95,t.everyPoint=M()>.85,t.metro=M()>.95,t.fixedShapes=!!(t.everyPoint||M()>.9)&&A(2,t.grid+1),t.hidden=M()>.95,t.stepsRange=P(["max","mid","full"]),t.backRects1=M()>.2,t.backRects2=M()>.2,t};let R;function setup(){b=createCanvas(S,C);const{pd:t=null}=y;t&&pixelDensity(Number(t)),D=new Array(5).fill(null).map((()=>createGraphics(S,C)));const[e,i,s,r]=D;R=D[4],angleMode(DEGREES),R.angleMode(DEGREES);const o=width/1e3;v=()=>{const t=calculateFeatures(),{palette:h,grid:n,shapes:c,doubleStrokes:u,tripleStrokes:a,zoomed:k,bundle:w,spirals:y,simple:S,fixedShapes:C,miniature:m,metro:v,everyPoint:b,stepsRange:H,backRects1:L,backRects2:O,hidden:I}=t,V=n,q=n,G=l(h,1*h.length);x=G[0],E=G[1],W=G[2];const N=m?.3:.1,X=width*N,Y=height*N,J=[2,4,8][B([1,1,.1])],U=void 0,$=(width-2*X)/(V*J),j=$;let _=k?4:1;const K=V*_,Q=q*_,T=(width-2*X)/K,Z=T,tt={2:1.4,3:1.2,4:1,5:.8,6:.6};let et=[];for(let t=0;t<K;t+=1)for(let e=0;e<Q;e+=1)et.push([t,e]);const it=[];z=[];for(let t=X;t<=Math.ceil(width-X-1);t+=T)for(let e=Y;e<=Math.ceil(height-Y-1);e+=T){const i=t+T/2,s=e+Z/2;let r="min"===c?.5:.3;n<4&&(r=.05),M()>r&&z.push(new g(R,i,s,T/2,G[P([1,2])],x,W,_,tt[n],M()>.5,M()>.5,M()>.5))}const st={2:3,3:5,4:9,5:9,6:9},rt={min:1,mid:3,max:10},ot="min"===c?n:V*_*rt[c];if(b)for(let t=0;t<et.length;t+=1){const e=void 0;let i;i=M()>.5?t%2==0?C:1:C,i=2===n?2:i,it.push(p(...et[t],i,K,Q,P,C<4))}else for(let t=0;t<ot;t+=1){let t;t="full"===H?A(1,st[n]):"mid"===H?A(Math.ceil(st[n]/2),st[n]):st[n],C&&(t=C),it.push(p(...P(et),t,K,Q,P))}const ht=P([5,10,20]),lt=P([1,2,4]);F=it.map(((t,o)=>{const{finalPoints:h,centers:l,arcs:p}=f(t,T,Z);let g=M()>.5,k=!g&&M()>.4;(w||o>it.length-3)&&(g=!1,k=!1);let C=M()>.1;o<it.length-3&&o>it.length-6&&(C=!0);let m=!1;y&&o>it.length-rt[c]*n&&(m=!0);const b=P([e,i,s,r]);let F=M()>.5,z=!F&&M()>.5,E=!z&&!F&&M()>.5;u&&(F=!0,z=!1),a&&(F=!1,z=!0),g||k||(C=!1),S&&(k=!1);const D=PI*T,A=D/ht,B=A*lt,R=M()*D*l.length;return new d(X,Y,_,h,p,l,G[P([1,2])],x,P([W,x]),g,m,C,F,z,E,k&&b,tt[n],M()>.9,!k&&M()>.6,P,v,A,B,R,I)})),background(E),D.forEach((t=>{t.background(E)}));const nt=void 0,pt=tt[n]*o;for(let t=X;t<Math.ceil(width-X-1);t+=$)for(let i=Y;i<Math.ceil(height-Y-1);i+=$)e.push(),e.noFill(),e.strokeWeight(2.5*pt/(J/2)),e.stroke(x),e.rect(t,i,$,$),e.pop();for(let t=X;t<Math.ceil(width-X-1);t+=$/2)for(let e=Y;e<Math.ceil(height-Y-1);e+=$/2)i.push(),i.noFill(),i.strokeWeight(1.25*pt/(J/2)),i.stroke(x),i.rect(t,e,$,$),i.pop();for(let t=X;t<Math.ceil(width-X-1);t+=$/.5)for(let e=Y;e<Math.ceil(height-Y-1);e+=$/.5)L&&(s.push(),s.fill(G[2]),s.strokeWeight(5*pt/(J/2)),s.stroke(x),s.rect(t,e,2*$,2*$),s.pop()),M()>.95&&(s.push(),s.noStroke(),s.strokeWeight(5*pt/(J/2)),s.stroke(L?E:W),s.fill(x),s.circle(t+$,e+j,$),s.pop());for(let t=X;t<Math.ceil(width-X-$);t+=$/.5)for(let e=Y;e<Math.ceil(height-Y-$);e+=$/.5)O&&(r.push(),r.fill(G[1]),r.strokeWeight(5*pt/(J/2)),r.stroke(x),r.rect(t,e,2*$,2*$),r.pop()),M()>.95&&(r.push(),r.noStroke(),r.strokeWeight(5*pt/(J/2)),r.stroke(x),r.fill(W),r.circle(t+$,e+j,$),r.pop());z.forEach((t=>{t.draw()})),F.forEach((t=>{t.draw(R)})),image(R,0,0)},v()}let H=!0;function windowResized(){const t=void 0,e=b.canvas.style;let i,s;1*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/1):(s=window.innerHeight,i=1*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{"s"===t.key&&saveCanvas(tokenData.hash,"png")}));