0xf7d96d2d…484dsent to0xd8b7cc75…bde6·#13,722,384·view on Etherscan
<!DOCTYPE html><html lang="en"> <head> <script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/p5@1.3.1/lib/p5.js" ></script> <style>body{background: #000; width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; flex-direction: row; margin: 0;}canvas{margin: auto; display: block; box-shadow: 0 2px 12px -2px rgba(0, 0, 0, 0.15);}</style> <meta charset="utf-8"/> </head> <body> <script>window.METADATA={};class Random{constructor(e){this.seed=parseInt(e.slice(0,16),16)}random_dec(){return this.seed^=this.seed<<13,this.seed^=this.seed>>17,this.seed^=this.seed<<5,(this.seed<0?1+~this.seed:this.seed)%1e8/1e8}random_between(e,l){return e+(l-e)*this.random_dec()}random_int(e,l){return Math.floor(this.random_between(e,l+1))}random_choice(e){return e[Math.floor(this.random_between(0,.99*e.length))]}}let A,W,H,M,D,C,seed,pL,sM,aL,L,cO,cS,cN,co,pCO,sB,sc,rT,xOM,yOM,rM,lRN,lRL,mNSX,mNSY,mNL,mNC,mNML,lS,pS,lL,lD,v,vLL,vUL,cl,clC,rC,cC,sS,di,R,wM,sW,cV,nD,log,S=1e3;function setup(){R=random,wM=window.METADATA,sW=strokeWeight,cV=createVector,log=console.log,nD=noiseDetail,disableFriendlyErrors=!0,colorMode(HSL,360,100,100,1),lCol();W=1e3*(A=[1,1.5])[0],H=1e3*A[1],createCanvas(W,H),D=min(W,H),M=D/S;const e=new Random("{{hash}}");seed=round(1e9*e.random_dec()),noiseSeed(seed),randomSeed(seed),console.log(seed),pL=6e5,sM=1,aL=.2,L=80,pixelDensity("undefined"!=typeof density?density:2);let l=R(cO),o=R();o<.0125?l={n:"Opaline",c:[[344,59,59],[29,75,64],[43,88,77],[150,36,47],[231,34,45],[292,32,53]],mNM:.12,cS:"Yes",cNM:.0015,mS:15}:o<.025&&(l={n:"Spectrum",c:[[338,64,50],[19,82,60],[51,84,63],[110,47,52],[208,57,51],[271,50,46]],mNM:.12,cS:"Yes",cNM:.0015,t:"l",mS:15}),co=(co=[...l.c]).map(e=>color(...e)),pCO=floor(R(co.length)),cS=WR(["No","Yes"],[1,2]),cN=WR([.001,.0015,.002],[4,2,1]),"No"==l.cS?(cS="No",cN=0):"Yes"==l.cS&&(cS="Yes"),sB=!0;let n="l"==l.t?color(37,31,93):color(220,60,7),t="l"==l.t?[70,180]:[15,40];if(sB){background(n),sW(.25*M);for(var c=0;c<1e3;c++){stroke(R(...t),R(.1,.15));let e=R(0,W),l=R(0,H);line(e,l,e+R(-50,50)*M,l+R(-50,50)*M)}sW(.15*M);for(c=0;c<5e3;c++)stroke(R(...t),R(.1,.15)),line(R(-W/2,1.5*W),R(-H/2,1.5*H),R(-W/2,1.5*W),R(-H/2,1.5*H))}else background(n);sc=WR([4,6,8,10,12,15,20,25,30],[1,2,3,4,5,4,3,2,1]),4==(sc=min(sc,l.mS||99))?cN=min(cN,.001):6==sc?cN=min(cN,.0015):l.cNM&&(cN=max(cN,l.cNM)),rT=WR(["None","Horizontal","Both"],[10,2,2]),sc<8&&(rT="None"),"None"==rT?(xOM=0,yOM=0):"Horizontal"==rT?(xOM=R(-.05,.05),yOM=0):"Vertical"==rT?(xOM=0,yOM=0):(xOM=R(-.05,.05),yOM=R(-.05,.05)),rM=WR(["Lines","Points","Alternate","Alternate Variation"],[4,4,2,1]),30==sc?aL*=1.25:25==sc?aL*=1.2:20==sc?aL*=1.15:15==sc?aL*=1.125:12==sc?aL*=1.1:10==sc?aL*=1.075:8==sc&&(aL*=1.05),"l"!=l.t&&(aL*=.95),lRN=R([.00125,.0025]),lRL=8,lRL*=pow(15/sc,.3),mNSX=R(1,1e3),mNSY=R(1,1e3),mNL=WR([1,2,3,4,5],[12,8,4,2,1]),"Lines"==rM&&(mNL=min(mNL,2)),sc>15?mNL=1:sc>10&&(mNL=min(mNL,3)),mNC=WR([.11,.12,.13,.14,.15],[5,8,8,5,2]),mNC=max(mNC,l.mNM||0),lS=WR([5,10,50],[1,2,1]),pS=WR([50,100,200],[1,2,3]),lL=WR([6,8,10,12,14,20],[2,3,4,3,2,1]),lD=WR([2,4,6,8,10],[1,4,6,4,1]),6==lL&&(mNL=min(2,mNL)),"None"!=rT&&(lD=min(lD,6)),v=WR([.04,.045,.05,.055],[1,3,3,1]),l.mNM&&(v=min(v,.05)),sS="None";let r=R();if(r<.025?(rT="None",sS="Quadrants"):r<.05?(sS="Circle",lL=max(lL,8)):r<.075?(rT="None",sS="Packed Circles",lL=max(lL,8)):r<.1&&(rT="None",sS="Subdivision",lL=max(lL,8)),di="None","None"==sS){let e=R();e<.03?di="Pinch":e<.06?sc>=8&&sc<=20&&(di="Spin",mNC=max(.12,mNC)):e<.1?sc<=12&&(rT=R(["Both","Horizontal"]),di="Diamond",mNC=max(.12,mNC)):e<.12?(di="Singularity","l"==l.t&&(aL*=1.1)):e<.14?sc>=6&&(rT=R(["Both","Horizontal"]),di="Echo"):e<.17&&(di="Reduction",mNC=.11,aL*=1.4,v=.02,lL=10,lD=4,sc=min(sc,15))}"None"==di&&R()<.025&&(di="Overlap",cN=.001,mNL=R([1,2]),mNC=.1,v=.055,aL*=.7,sc=min(sc,20)),wM["Color Palette"]=l.n,wM["Color Variation"]="No"==cS?"None":["Low","Medium","High"][round(2e3*cN-2)],wM.Distortion=di,wM["Edge Movement"]=["Very Low","Low","Medium","High","Very High"][mNL-1],wM["Layer Gap"]=["None","Very Low","Low","Medium","High","Very High"][round(100*(mNC-.1))],wM["Layer Count"]=lL,wM["Layer Spread"]=["Very Low","Low","Medium","High","Very High"][round(lD/2)-1],wM["Layer Style"]=rM,wM["Layer Thickness"]=.02==v?"Very Low":["Low","Medium","High","Very High"][round(1e3*v-40)/5],wM.Reflection=rT,wM.Scaling=sc,wM.Stencil=sS,.1!=mNC&&(30==sc?mNC*=1.3:25==sc?mNC*=1.25:20==sc?mNC*=1.15:15==sc&&(mNC*=1.05)),"Overlap"==di&&(v=.065),crCo(),crCl(),C=0,log(wM)}function draw(){if(translate(W/2,H/2),0==C){sMND();for(let e of cl)seCl(e);rND()}for(let e=0;e<L;e++){for(let e of cl)drCl(e);C++}noLoop()}function crCo(){rC=[],cC=[];let e=S*A[0],l=S*A[1],o=.05;if("Quadrants"==sS)rC=[{x1:-.45*e,y1:-.5*l+o*e,x2:-.025*e,y2:-.025*e},{x1:.025*e,y1:-.5*l+o*e,x2:.45*e,y2:-.025*e},{x1:-.45*e,y1:.025*e,x2:-.025*e,y2:.5*l-o*e},{x1:.025*e,y1:.025*e,x2:.45*e,y2:.5*l-o*e}];else if("Circle"==sS)cC=[{x:0,y:0,r:.45*S}];else if("Packed Circles"==sS)ciP(.0125,R(.15,.3),.025,5e3);else if("Subdivision"==sS)sd(4,-.5*e,-.5*l,e,l);else{let o=.04;rC=[{x1:(-.5+o)*e,y1:-.5*l+o*e,x2:(.5-o)*e,y2:.5*l-o*e}]}}function crCl(){if(cl=[],"Quadrants"==sS){clC=4;for(let e=0;e<clC;e++){let l={};l.xC=[-.25,.25,-.25,.25][e],l.yC=[-.25,-.25,.25,.25][e],l.xLS=-.275,l.xUS=.275,l.yLS=-.275,l.yUS=.275,l.sc=[5,8,12,20][e],l.con=e,cl.push({c:l,pG:[]})}}else clC=1,cl.push({c:{xC:0,yC:0,xLS:-.55,xUS:.55,yLS:-.55,yUS:.55,sc:sc},pG:[]})}function seCl(e){let{xC:l,yC:o,xLS:n,xUS:t,yLS:c,yUS:r}={...e.c},s=[];for(let e=0;e<lL;e++)s.push(co[(e+pCO)%co.length]);for(var i=0;i<lL;i++){let y=[],p=s[i],x=floor(pL/lL/clC);for(var a=0;a<x;a++){let e=a%2!=0?map(noise(a/x*pS,i/lL*lS),0,mNML,l+n,l+t):R(l+n,l+t),s=a%2!=0?map(noise(1e4+a/x*pS,1e4+i/lL*lS),0,mNML,o+c,o+r):R(o+c,o+r),m="Lines"==rM||("Alternate"==rM||"Alternate Variation"==rM)&&i%2==1;y.push(new Particle(e*S*A[0],s*S*A[1],2*R()*PI,p,m))}e.pG.push(y)}}function drCl(e){vLL=.5-v,vUL=.5+v,e.pG.forEach((l,o)=>{l.forEach(l=>{l.update(o,e.c.sc),l.display(o,e.c.con)})})}class Particle{constructor(e,l,o,n,t){let c=this;c.p={x:e,y:l},c.a=o,c.v=0,c.c=null,n&&(c.c=color(n),c.c.setAlpha(aL)),c.lR=t,c.lRC=0,c.lRP={x:e,y:l}}update(e,l){let o=this;sMND(),o.p.x+=4*cos(o.a),o.p.y+=4*sin(o.a);let n=l*o.p.x/(S*A[0]),t=l*o.p.y/(S*A[1]);o.v="Pinch"==di?noise(2e4+n/pow(abs(t),.3)+mNSX,2e4+t/pow(abs(n),.3)+mNSY)/mNML+mNC*(e-lL/lD):"Diamond"==di?noise(2e4+n+mNSX,2e4+t+mNSY,150*sin(1e3+(abs(n)+abs(t))/50))/mNML+mNC*(e-lL/lD):noise(2e4+n+mNSX,2e4+t+mNSY)/mNML+mNC*(e-lL/lD),o.a+=4*map(o.v,0,1,-1,1),rND()}display(e,l){let o=this;if(o.v>vLL&&o.v<vUL){let n;if(colorMode(RGB,255,255,255,1),"No"==cS)n=o.c;else{let l=noise(3e4+o.p.x*cN,3e4+o.p.y*cN)*co.length*2+e,t=color(co[floor(l)%co.length]),c=color(co[floor(l+1)%co.length]);(n=lerpColor(t,c,l%1)).setAlpha(aL)}colorMode(HSL,360,100,100,1);let t,c=o.lR;if("Variation"!=rM&&"Alternate Variation"!=rM||(t=noise(4e4+o.p.x*t,4e4+o.p.y*t)<.5+map(R(),0,1,-.15,.15)),"Variation"==rM?c=t:"Alternate Variation"==rM&&t&&(c=!c),c){if(dist(o.lRP.x,o.lRP.y,o.p.x,o.p.y)<lRL)return!1;if(o.lRC++,o.lRC%2!=0)return o.lRP.x=o.p.x,o.lRP.y=o.p.y,!1}let r=xOM*S*A[0],s=yOM*S*A[1],i=[],a=[];("None"==rT||"Horizontal"==rT&&o.p.x+r>0||"Vertical"==rT&&o.p.y+s>0||"Both"==rT&&o.p.x+r>0&&o.p.y+s>0)&&(c&&o.lRP.x?i.push({px:o.lRP.x+r,py:o.lRP.y+s,x:o.p.x+r,y:o.p.y+s}):c||a.push({x:o.p.x+r,y:o.p.y+s,r:sM})),("Horizontal"==rT&&o.p.x+r>0||"Both"==rT&&o.p.x+r>0&&o.p.y+s>0)&&(c&&o.lRP.x?i.push({px:-(o.lRP.x+r),py:o.lRP.y+s,x:-(o.p.x+r),y:o.p.y+s}):c||a.push({x:-(o.p.x+r),y:o.p.y+s,r:sM})),"Both"==rT&&o.p.x+r>0&&o.p.y+s>0&&(c&&o.lRP.x?i.push({px:o.lRP.x+r,py:-(o.lRP.y+s),x:o.p.x+r,y:-(o.p.y+s)}):c||a.push({x:o.p.x+r,y:-(o.p.y+s),r:sM}),c&&o.lRP.x?i.push({px:-(o.lRP.x+r),py:-(o.lRP.y+s),x:-(o.p.x+r),y:-(o.p.y+s)}):c||a.push({x:-(o.p.x+r),y:-(o.p.y+s),r:sM}));for(let e of i){if("Echo"==di){let l=cV(e.px,e.py);l.setMag(l.mag()*map(noise(e.px/200,e.py/200,5e4),0,1,.5,2)),e.px=l.x,e.py=l.y;let o=cV(e.x,e.y);o.setMag(o.mag()*map(noise(e.x/200,e.y/200,5e4),0,1,.5,2)),e.x=o.x,e.y=o.y}else if("Singularity"==di){let l=cV(e.px,e.py),o=l.heading()+PI/2;l.setMag(l.mag()*map(sin(2*o),-1,1,0,3)),e.px=l.x,e.py=l.y;let n=cV(e.x,e.y),t=n.heading()+PI/2;n.setMag(n.mag()*map(sin(2*t),-1,1,0,3)),e.x=n.x,e.y=n.y}else if("Spin"==di){let l=cV(e.px,e.py),o=2*TWO_PI*pow(max(0,l.mag()/S-.25),2.5);l.rotate(o),e.px=l.x,e.py=l.y;let n=cV(e.x,e.y),t=2*TWO_PI*pow(max(0,n.mag()/S-.25),2.5);n.rotate(t),e.x=n.x,e.y=n.y}let o=!rC.length&&!cC.length;for(let n=0;n<rC.length;n++)if(void 0===l||l==n){let l=rC[n];(o||e.x>l.x1&&e.x<l.x2&&e.y>l.y1&&e.y<l.y2&&e.px>l.x1&&e.px<l.x2&&e.py>l.y1&&e.py<l.y2)&&(o=!0)}for(let n=0;n<cC.length;n++)if(null==l||l==n){let l=cC[n];(o||dist(e.x,e.y,l.x,l.y)<l.r&&dist(e.px,e.py,l.x,l.y)<l.r)&&(o=!0)}o&&(stroke(n),sW(.25*sM*M),line(e.px*M,e.py*M,e.x*M,e.y*M))}for(let e of a){if("Echo"==di){let l=cV(e.x,e.y);l.setMag(l.mag()*map(noise(e.x/200,e.y/200,5e4),0,1,.5,2)),e.x=l.x,e.y=l.y}else if("Singularity"==di){let l=cV(e.x,e.y),o=l.heading()+PI/2;l.setMag(l.mag()*map(sin(2*o),-1,1,0,3)),e.x=l.x,e.y=l.y}else if("Spin"==di){let l=cV(e.x,e.y),o=2*TWO_PI*pow(max(0,l.mag()/S-.25),2.5);l.rotate(o),e.x=l.x,e.y=l.y}let t=!rC.length&&!cC.length;for(let o=0;o<rC.length;o++)if(void 0===l||l==o){let l=rC[o];(t||e.x>l.x1&&e.x<l.x2&&e.y>l.y1&&e.y<l.y2)&&(t=!0)}for(let o=0;o<cC.length;o++)if(null==l||l==e){let l=cC[o];(t||dist(e.x,e.y,l.x,l.y)<l.r)&&(t=!0)}t&&(noStroke(),fill(n),circle(e.x*M,e.y*M,e.r*M)),o.lR&&(o.lRP.x=o.p.x,o.lRP.y=o.p.y)}}}}function ciP(e,l,o,n){let t=l*S;for(var c=n;c>0;){for(var r={x:R(-S/2,S/2)*A[0],y:R(-S/2,S/2)*A[1],r:t},s=!0,i=0;i<cC.length;i++){var a=cC[i];if(dist(r.x,r.y,a.x,a.y)<r.r+a.r+o*S){s=!1;break}}s&&cC.push(r),0===--c&&t>e*S&&(t-=1,c=n)}}function sd(e,l,o,n,t){if(0==e)noFill(),rC.push({x1:l+15,y1:o+15,x2:l+n-15,y2:o+t-15});else{let c=R(.25,.75),r=R()>.5;n/t>4&&(r=!1),t/n>4&&(r=!0),r?(sd(e-1,l,o,n,t*c),sd(e-1,l,o+t*c,n,t*(1-c))):(sd(e-1,l,o,n*c,t),sd(e-1,l+n*c,o,n*(1-c),t))}}function sMND(){1==mNL?(nD(3,.01),mNML=.5):2==mNL?(nD(3,.05),mNML=.52):3==mNL?(nD(3,.075),mNML=.535):4==mNL?(nD(3,.1),mNML=.55):5==mNL&&(nD(3,.15),mNML=.585)}function rND(){nD(4,.5)}function WR(e,l){let o;for(o=0;o<l.length;o++)l[o]+=l[o-1]||0;let n=R()*l[l.length-1];for(o=0;o<l.length&&!(l[o]>n);o++);return e[o]}function lCol(){cO=[{n:"Amsterdam",c:[[242,41,35],[278,55,41],[328,40,45],[10,62,60],[40,65,62]],cS:"Yes",t:"l"},{n:"Apple",c:[[6,75,50],[92,40,50],[8,66,65],[69,52,65],[207,5,50]],t:"l"},{n:"Atlas",c:[[120,25,38],[105,32,50],[29,40,46],[33,31,60],[195,22,65],[200,59,58]],t:"l"},{n:"Autumn",c:[[16,90,20],[40,91,67],[30,83,32],[33,22,75],[29,19,44]],cS:"Yes",t:"l"},{n:"Beachball",c:[[201,51,60],[205,93,40],[203,40,26],[40,90,55],[21,90,50]],t:"l"},{n:"Blossom",c:[[342,66,54],[358,54,64],[14,24,79],[180,11,78],[192,46,59]],mS:20,cS:"Yes",t:"l"},{n:"Blueberry",c:[[342,66,54],[358,54,64],[14,24,79],[180,11,78],[192,46,59]]},{n:"Burst",c:[[178,87,37],[159,35,70],[35,95,67],[18,100,46],[0,54,38]],cS:"Yes",t:"l"},{n:"Chalk",c:[[0,0,100],[0,0,55],[0,0,85],[0,0,70]]},{n:"Charcoal",c:[[0,0,15],[0,0,65],[0,0,0],[0,0,40]],t:"l"},{n:"Copper",c:[[200,58,20],[124,8,63],[185,44,28],[166,14,75],[27,24,53],[48,35,80]],cS:"Yes"},{n:"Dusk",c:[[42,76,67],[27,72,57],[7,69,47],[248,18,43],[219,25,70]],cS:"Yes"},{n:"Earth",c:[[120,25,35],[105,32,50],[29,40,49],[33,31,60],[195,22,63],[200,59,61]]},{n:"Embers",c:[[0,0,0],[0,0,29],[0,0,77],[34,100,50],[16,100,50]],t:"l"},{n:"Ignis",c:[[15,100,19],[10,100,28],[15,100,38],[40,88,52],[55,88,72]]},{n:"Iris",c:[[150,38,85],[194,44,58],[270,69,80],[243,63,77],[244,45,43]],mS:20,cS:"Yes",t:"l"},{n:"Mint",c:[[189,53,77],[178,40,48],[200,46,83],[183,50,34]]},{n:"Monarch",c:[[16,90,20],[40,91,67],[30,83,32],[33,22,75],[29,19,44]]},{n:"Mulan",c:[[0,70,45],[0,0,100],[5,70,50],[0,0,95]],mS:12,cS:"No"},{n:"Ore",c:[[15,8,90],[180,6,36],[25,38,78],[186,13,53],[38,78,66]]},{n:"Pacific",c:[[198,63,38],[209,53,21],[202,78,49],[199,80,29],[186,28,68]],cS:"Yes",t:"l"},{n:"Pistachio",c:[[180,8,51],[150,31,49],[110,40,63],[80,47,53],[73,57,38]],mS:25,t:"l"},{n:"Surf",c:[[210,95,25],[200,85,40],[190,75,45],[185,65,65],[180,55,85]]},{n:"Tino",c:[[0,60,40],[180,10,0],[5,55,45],[180,10,5]],mS:12,cS:"No",t:"l"},{n:"Tron",c:[[20,90,55],[34,100,71],[0,0,100],[176,42,67],[174,62,47]]},{n:"Ultraviolet",c:[[230,83,85],[224,75,63],[270,94,80],[243,88,72]]},{n:"Viridis",c:[[87,55,30],[85,65,45],[206,15,10],[85,30,25],[205,5,38]],t:"l"}]}</script> </body></html>P5JS