class Random{constructor(){this.useA=!1;let t=function(t){let e=parseInt(t.substr(0,8),16),n=parseInt(t.substr(8,8),16),i=parseInt(t.substr(16,8),16),$=parseInt(t.substr(24,8),16);return function(){i|=0;let t=((e|=0)+(n|=0)|0)+($|=0)|0;return $=$+1|0,e=n^n>>>9,n=i+(i<<3)|0,i=(i=i<<21|i>>>11)+t|0,(t>>>0)/4294967296}};this.prngA=new t(tokenData.hash.substr(2,32)),this.prngB=new t(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}g(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}}switch(tokenNumber=tokenData.tokenId.substr(-3,3)){default:tokenData.hash=tokenData.hash}OUTLINE=!1;const R=new Random,f=Math.floor;let conf={};function init(){startTime=new Date,amp=amplitude*conf.height,y1=coords[0].y*amp-amp,y3=coords[2].y*amp-amp,y2=coords[1].y*amp-amp,y4=coords[3].y*amp-amp,g1*=conf.height/lines,g2*=conf.height/lines,g3*=conf.height/lines,g4*=conf.height/lines,conf.grid=[...Array(f(2*lines))].map((t,e)=>[{x:coords[0].x*conf.width,y:conf.height/lines*e+y1+g1*e-conf.pr},{x:coords[0].x*conf.width,y:conf.height/lines*e+y1+g1*e-conf.pr},{x:coords[1].x*conf.width,y:conf.height/lines*e+y2+g2*e-conf.pr},{x:coords[2].x*conf.width,y:conf.height/lines*e+y3+g3*e-conf.pr},{x:coords[3].x*conf.width,y:conf.height/lines*e+y4+g4*e-conf.pr},{x:coords[3].x*conf.width,y:conf.height/lines*e+y4+g4*e-conf.pr},]).filter(t=>t[0].y<1.5*h||t[1].y<1.5*h||t[2].y<1.5*h||t[3].y<1.5*h),conf.shadow_grid=[...Array(f(conf.grid.length))].map((t,e)=>(tshadowSize=shadowSize,shadowSizeVariable&&(tshadowSize=shadowSize*(R.g()/2+.5)),[{x:coords[3].x*conf.width,y:conf.height/lines*(e+tshadowSize)+y4+g4*(e+1)-2*conf.pr},{x:coords[3].x*conf.width,y:conf.height/lines*(e+tshadowSize)+y4+g4*(e+1)-2*conf.pr},{x:coords[2].x*conf.width,y:conf.height/lines*(e+tshadowSize)+y3+g3*(e+1)-2*conf.pr},{x:coords[1].x*conf.width,y:conf.height/lines*(e+tshadowSize)+y2+g2*(e+1)-2*conf.pr},{x:coords[0].x*conf.width,y:conf.height/lines*(e+tshadowSize)+y1+g1*(e+1)-2*conf.pr},{x:coords[0].x*conf.width,y:conf.height/lines*(e+tshadowSize)+y1+g1*(e+1)-2*conf.pr},])).filter(t=>t[0].y<1.5*h||t[1].y<1.5*h||t[2].y<1.5*h||t[3].y<1.5*h),conf.grid=conf.grid.map(t=>chaikin(t,curve1)).map(t=>t.map(t=>inCircle(t))).map(t=>chaikin(t,curve2)).map(t=>t.map(t=>inCircle(t))),conf.shadow_grid=conf.shadow_grid.map(t=>chaikin(t,curve1)).map(t=>t.map(t=>inCircle(t))).map(t=>chaikin(t,curve2)).map(t=>t.map(t=>inCircle(t))),duotone&&(colorSet[2]=highlightColor[0],coll=colorPalette[f(R.g()*colorPalette.length)],colorCount=2,colorPalette=[highlightColor[0],coll,coll]),draw()}function draw(t=0){let e=returnCanvasObjectContext();e.lineWidth=1.5*conf.pr,e.fillStyle=colorSet[2],OUTLINE&&(e.fillStyle="#00419F"),highlightBalance<.2&&(e.fillStyle=highlightColor[0]),e.fill(),e.fillRect(0,0,conf.width,conf.height),0!=rotate&&(e.translate(conf.width/2,conf.height/2),s=Math.abs(Math.cos(th=rotate*Math.PI/180))+Math.abs(Math.sin(th))*conf.height/conf.width,e.rotate(th),e.scale(s,s),e.translate(-(conf.width/2),-(conf.height/2))),conf.grid.map((t,n)=>{if(n%overstep)return!1;if(e.beginPath(),t.map(t=>{x=t.x,y=t.y,e.lineTo(x,y)}),n<conf.grid.length-1&&conf.grid[n+1].slice().reverse().map(t=>{x=t.x,y=t.y,e.lineTo(x,y)}),e.closePath(),OUTLINE?(e.strokeStyle=colorPalette[n%colorCount],e.strokeStyle="#ffffff33",e.stroke()):(highlightIndex[n]?(e.fillStyle=highlightColor[0],e.strokeStyle=dark(highlightColor[0],-outlineStrength)):(e.fillStyle=dark(colorPalette[n%colorCount],4*R.g()-2),e.strokeStyle=dark(colorPalette[n%colorCount],-outlineStrength),colorStructure||(e.fillStyle=dark(colorPalette[f(colran[n]*colorPalette.length)],colsha[n]),e.strokeStyle=dark(colorPalette[f(colran[n]*colorPalette.length)],-outlineStrength))),outlined&&(e.lineWidth=1.5*conf.pr,e.stroke()),e.fill()),!OUTLINE){if(n%overstep||!conf.shadow_grid[n])return!1;e.beginPath(),conf.grid[n].map(t=>{x=t.x,y=t.y,e.lineTo(x,y)}),conf.shadow_grid[n].map(t=>{x=t.x,y=t.y,e.lineTo(x,y)}),highlightIndex[n]?e.fillStyle=highlightColor[1]:(e.fillStyle=dark(colorPalette[n%colorCount],-shadowOpacity),colorStructure||(e.fillStyle=dark(colorPalette[f(colran[n]*colorPalette.length)],-shadowOpacity))),e.fill(),e.closePath()}}),e.setTransform(1,0,0,1,0,0),e.fillStyle=colorSet[2],highlightBalance<.2&&(e.fillStyle=highlightColor[0]),OUTLINE&&(e.fillStyle="#00419F",e.fillStyle="#000000"),e.fillRect(0,0,conf.width*border,conf.height),e.fillRect(conf.width-conf.width*border,0,conf.width*border,conf.height),e.fillRect(0,0,conf.width,conf.width*border),e.fillRect(0,conf.height-conf.width*border,conf.width,conf.width*border)}function chaikin(t,e){if(0===e)return t;let n=t.length,i=t.map((e,i)=>i===t.length-1?[{x:e.x,y:e.y}]:[{x:.75*e.x+.25*t[(i+1)%n].x,y:.75*e.y+.25*t[(i+1)%n].y},{x:.25*e.x+.75*t[(i+1)%n].x,y:.25*e.y+.75*t[(i+1)%n].y}]).flat();return 1===e?i:chaikin(i,e-1)}function dark(t,e){let n=parseInt(t.substr(1,6),16),i=Math.round(2.55*e),$=(n>>16)+i,c=(n>>8&255)+i,o=(255&n)+i;return"#"+(16777216+($<255?$<1?0:$:255)*65536+(c<255?c<1?0:c:255)*256+(o<255?o<1?0:o:255)).toString(16).slice(1)}function pick_color(t){let e,n=[];for(e=0;e<t.length;e++)n[e]=t[e][3]+(n[e-1]||0);let i=R.g()*n[n.length-1];for(e=0;e<n.length&&!(n[e]>i);e++);return t[e]}function returnColorPalette(){return colorCount=colorSet[1].length,colorSet[1]}function returnCanvasObject(){return document.getElementById("c")}function returnCanvasObjectContext(){let t=document.getElementById("c");return t.getContext("2d",{alpha:!1})}function inCircle({x:t,y:e}){let n=!1;for(let i=0;i<conf.circles.length;i++){let $=conf.circles[i][0]*conf.width,c=conf.circles[i][1]*conf.height,o=conf.circles[i][2]*conf.width;t>$-o&&t<$+o&&e>c-o&&e<c+o&&(isSquare||Math.hypot(t-$,e-c)<conf.circles[i][2]*conf.width)&&(n&&Math.hypot(t-$,e-c)<n||!n)&&(n={x:0===t?0:t===conf.width?conf.width:conf.circles[i][0]*conf.width,y:0===e?0:e===conf.height?conf.height:conf.circles[i][1]*conf.height})}return n||{x:t,y:e}}function dist(t,e,n,i){let $=n-t,c=i-e;return Math.sqrt(c*c+$*$)}function vertexInsideCircle(t,e,n,i){let $=!1,c=circlePacking?circlePackingMultiplier:1;var o=i;return dist(t,e,o[0],o[1])<o[2]*c+n*c&&($=!0),$}function updateResolution(t=!0){let e=returnCanvasObject();w=((ww=window.innerWidth)<.75*(wh=window.innerHeight)?ww:wh/4*3)*2,h=(ww<.75*wh?ww/3*4:wh)*2,conf.width=w,conf.height=h,conf.pr=w/1500,e.width=w,e.height=h,e.style.width=conf.width/2,e.style.height=conf.height/2,e.style.maxWidth="75vh",e.style.maxHeight="100vh",t&&init()}function generateCircles(){inout=R.g()>.5,minus=R.g()>.5?-1*R.g():-1,m1=R.g(),val1=R.g()>.5?1:0,val2=R.g()>.5?1:0,cscale=R.g()/2+.5,scaler=R.g()>.9?0:1,circleSize=70*R.g()+30,zigzagVal=2*R.g(),centerPoint=R.g()/2+.25,centerPointY=R.g()/2+.25,m1=0,conf.circles=[];for(let t=0;t<circleCount;t++){let e=R.g(),n=R.g();"zigzag"===hotspotPlacement&&(e=Math.sin(t/50)/(2+zigzagVal)+centerPoint+(noise=R.g()>.25?R.g()/2-.25:0),n=t/circleCount+noise),"circle"===hotspotPlacement&&(centerPoint=R.g()/5+.4,centerPointY=R.g()/5+.4,e=Math.sin(t/8)/(2+t/circleSize)+centerPoint+(noise=R.g()>.6?R.g()/4-.125:0),n=Math.cos(t/8)/(2+t/circleSize)*.75+centerPointY+noise),"linear"===hotspotPlacement&&(xval=f(100*R.g()),yval=f(100*R.g()),e=t%xval/xval,n=t%yval/yval);let i=R.g()*maxCircleRadius,$=0===val1?e:n,c=0===val2?e:n;1===scaler&&(cscale=Math.abs(Math.abs($-m1)+Math.abs(c-m1)+minus)),i=circleVariable?cscale*i:cscale*maxCircleRadius,0===conf.circles.length&&(valli=!1,conf.circles.push([e,n,i])),circlePacking?(valli=!0,conf.circles.map(t=>{vertexInsideCircle(e,n,i,t)&&(valli=!1)})):valli=!0,valli&&conf.circles.push([e,n,i])}conf.circles.sort((t,e)=>e[2]-t[2])}mixSet1=["#111111","#7EDDE3","#7E82E3","#10AFE1","#EC2F28","#EC671D","#EEEEEE","#F0C627","#2170E7","#06C16B","#E37E89","#F0BFC5"],mixSet2=["#EEEFE6","#EEEBD8","#F8DCCE","#DDD5C3","#2D2A36","#57CABB","#0976B2","#C73628","#4C1204","#EAC325"],ms1=[...Array(f(6*R.g())+4)].map((t,e)=>(0===e&&mixSet1[f(R.g()*mixSet1.length/2)],1===e&&mixSet1[f(R.g()*mixSet1.length/2)+f(mixSet1.length/2)],mixSet1[f(R.g()*mixSet1.length)])),colorGroups=[["Pop ƒ",ms1,"#111111",.4],["Pop",["#111111","#7EDDE3","#7E82E3","#10AFE1","#EC2F28","#EC671D","#EEEEEE","#F0C627","#2170E7","#06C16B","#E37E89","#F0BFC5"],"#111111",.2],["Empire of Flora",["#EEEFE6","#EEEBD8","#F8DCCE","#DDD5C3","#2D2A36","#57CABB","#0976B2","#FAB286","#C73628","#4C1204","#EAC325"],"#EEEFE6",.3],["Empire of Flora ƒ",ms2=[...Array(f(6*R.g())+4)].map((t,e)=>(0===e&&mixSet2[f(R.g()*mixSet2.length/2)],1===e&&mixSet2[f(R.g()*mixSet2.length/2)+f(mixSet2.length/2)],mixSet2[f(R.g()*mixSet2.length)])),"#EEEFE6",.5],["FBASQ",["#087EC9","#319CDF","#36A7D8","#101010","#453232","#F8F7F7"],"#087EC9",.125],["Richter",["#333333","#EEEEEE","#FFB6C1","#008080","#FF4500","#FFD700","#9400D3","#00BFFF"],"#EEEEEE",.25],["Gradation Green",["#DBD7BE","#C0C6B8","#A2BFAA","#99A7A4","#3D7271","#365162","#3B4657","#FCE7CA","#ECCFC2"],"#DBD7BE",.15],["Mono",["#04090D","#0C1517","#1B2529","#2A3437","#D9DDDB"],"#04090D",.2],["Hero and Leandro",["#D8E4E0","#B9CECA","#E9E1DB","#960020","#4D2D35","#181415"],"#D8E4E0",.15],["Untitled Blue",["#E8D7CD","#8B87A4","#352E53"],"#E8D7CD",.15],["Kaido-Maru",["#1A172C","#505F7E","#7487A4","#98ABB4","#FCD173","#FFF6B2"],"#1A172C",.15],["Two little birds",["#C4AC43","#EDDBCC","#D8C6B8","#E8D4C6","#625647","#7D826F"],"#EDDBCC",.2],["Nouns",["#D4D1BB","#DEDDCF","#CCC7B0","#CCBFB0","#0637AE","#DF3419","#072C87"],"#D4D1BB",.15],["Harmonie",["#B0AAA7","#E83D05","#ED0004","#FAB905","#DCC7BB","#3D3236","#3B657D","#748C58"],"#B0AAA7",.25],["Acid",["#E9E3D5","#E1DBCD","#19A8B1","#003C4F","#DCC253","#005068","#3BA2A8"],"#E9E3D5",.1]],scale=0==(rotate=R.g()>.4?120*R.g()-60:0)&&R.g()>.4?2.5*R.g()+1:R.g()>.6?R.g()+1:1,yCurveMax=(straight=R.g()>.8)?0:R.g()/2,border=.015,colorPalette=(colorSet=pick_color(colorGroups))[1],colorCount=colorSet[1].length,duotone=!1,lines=f((rotate,(f(450*R.g())+80)/scale)),overstep=R.g()>.95&&f(2*R.g())+1,curve2=Math.max(7-(curve1=f(3*R.g())+4),3),highlightBalance=[.15,.5,.9,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95,.95][f(40*R.g())],highlightColor=[["#000000","#111111"],["#111111","#222222"],["#222222","#333333"]][f(3*R.g())],colorStructure=overstep&&R.g()>.5||R.g()>.9,circlePacking=R.g()>.4,circlePackingMultiplier=[.75*R.g()+.25,R.g()][f(2*R.g())],circleCount=f(([f(150*R.g()),f(300*R.g()),f(400*R.g())][f(3*R.g())]+90)/scale),circleVariable=R.g()>0,maxCircleRadius=(.08*R.g()+.08)*scale,isSquare=R.g()>.85,hotspotPlacement=["circle","linear","random","random","random","random"][f(6*R.g())],amplitude=.75*R.g(),shadowSizeVariable=R.g()>.5,shadowSize=.5*R.g()+.1,shadowOpacity=Math.max(25*R.g(),10),coords=[{x:0,y:R.g()*yCurveMax,g:10*R.g()},{x:.15+R.g()/4,y:R.g()*yCurveMax,g:10*R.g()},{x:.62+R.g()/4,y:R.g()*yCurveMax,g:10*R.g()},{x:1,y:R.g()*yCurveMax,g:10*R.g()}],highlightIndex=[...Array(f(2*lines))].map((t,e)=>R.g()>highlightBalance),outlined=R.g()>.925,outlineStrength=[10,20,30][f(3*R.g())],blockMidGrowth=R.g()>.2,colran=[...Array(2*lines)].map(t=>R.g()),colsha=[...Array(2*lines)].map(t=>4*R.g()-2),straight||!blockMidGrowth?(g1=0,g2=0,g3=0,g4=0):(g1=R.g()/4+.25,g2=R.g()/4+.25,g3=R.g()/4+.25,g4=R.g()/4+.25),(g2>g1&&g2>g4&&g3>g1&&g3>g4||g2<g1&&g2<g4&&g3<g1&&g3<g4)&&(gx=g3,g3=g4,g4=gx),window.onload=()=>{var t;document.getElementsByTagName("canvas")[0].id="c",updateResolution(!1),generateCircles(),init()},window.addEventListener("keypress",t=>{if(115===t.keyCode){var e=document.getElementById("c"),n=document.createElement("a");n.id="download-link",n.setAttribute("download",tokenData.hash+".png"),n.setAttribute("href",e.toDataURL("image/png").replace("image/png","image/octet-stream")),n.click()}111===t.keyCode&&(OUTLINE=!OUTLINE,draw())});
↓ show full (11,795 bytes)