0x21f974b8…45e2sent to0x99a9b7c1…b069·#15,997,510·view on Etherscan
p5.disableFriendlyErrors=!0;class Random{constructor(){this.useA=!1;let e=function(e){let $=parseInt(e.substr(0,8),16),t=parseInt(e.substr(8,8),16),r=parseInt(e.substr(16,8),16),s=parseInt(e.substr(24,8),16);return function(){r|=0;let e=(($|=0)+(t|=0)|0)+(s|=0)|0;return s=s+1|0,$=t^t>>>9,t=r+(r<<3)|0,r=(r=r<<21|r>>>11)+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let $=0;$<1e6;$+=2)this.prngA(),this.prngB()}rd(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}}function gaussRand(){return r1=R.rd(),r2=R.rd(),Math.sqrt(-2*Math.log(r1))*Math.cos(2*Math.PI*r2)}R=new Random;var gen_size,grid_size=5,p_var_inc=.1,trail_length=4,buffer=.03,vars=["x","y","z","theta"],funcs=["($+$)","($-$)","(-1*$)","sin($)","sqabs($)","($*$)","cos($)","(1.5*$)","ease($)","bulge($)","ratio($,$)","abs($)","nabs($)"],p=[],init_pts=[],aspect_ratio=16/9,shape_sides=Math.floor(5*R.rd())+Math.floor(5*R.rd())+4;shape_size=.02*Math.exp(gaussRand()/1.5);var theta_modulo=1+Math.floor(3*R.rd())+Math.floor(3*R.rd());growth_rand=R.rd(),buffer_strokes=.9>R.rd(),max_growth=growth_rand<.8?5:1,tri_brush=.2>R.rd(),margin=.8>R.rd()?.12:.03,layer_rand=R.rd();var min_size=.05,max_size=.35;brush_gen_size=4,layer_rand<.1?(num_layers=1,brush_gen_size=6,max_size=.5):num_layers=layer_rand<.7?3:5,num_layers>2&&((stroke_size_rand=R.rd())<.1?max_size=.15:stroke_size_rand<.15&&(max_size=.7));var high_stroke_color=.1>R.rd();p_num=Math.floor(7*R.rd()),rescale=1,c1_offset=R.rd(),c2_offset=R.rd(),c1_mult=.5>R.rd()?1:-1,c2_mult=.5>R.rd()?1:-1;var looping=!1,time=0,draw_iter=0,poly_pt_list=[],gen_shape="",brush_pts=[],stroke_pts=[],draw_offsets=[];for(let i=0;i<num_layers;i++)draw_offsets[i]=0;var color_offsets=[];for(let i=0;i<num_layers;i++)color_offsets[i]=0;function setup(){unit=floor(min(windowWidth/(16/9),windowHeight)),2>pixelDensity()&&pixelDensity(2),createCanvas(floor(16*unit/9),unit),frameRate(60),0==p_num?(background("#E9F3ED"),pb=color("#E9F3ED"),p[0]=color("#000000"),p[1]=color("#0B1628"),p[2]=color("#113382"),p[3]=color("#3F98B5"),p[4]=color("#99C6D5"),p[5]=color("#D4DFCE"),p[6]=color("#682D16"),p[7]=color("#BA5B0C"),p[8]=color("#ECB22D")):1==p_num?(background("#E9E3D8"),p[0]=color("#180E1B"),p[1]=color("#05246C"),p[2]=color("#0053A9"),p[3]=color("#00ACC7"),p[4]=color("#CFEDF0"),p[5]=color("#6C081C"),p[6]=color("#ED3414"),p[7]=color("#FFAF5E"),p[8]=color("#FFF386"),pb=color("#E9E3D8")):2==p_num?(background("#E0E0E0"),pb=color("#E0E0E0"),p[0]=color("#135331"),p[1]=color("#48AD85"),p[2]=color("#F1F1F1"),p[3]=color("#88C8CF"),p[4]=color("#154EB7"),p[5]=color("#123F39"),p[6]=color("#CA4F02"),p[7]=color("#E9D113"),p[8]=color("#73A034")):3==p_num?(background(color("#F7ECFE")),pb=color("#F7ECFE"),p[0]=color("#F3F3ED"),p[1]=color("#F0E594"),p[2]=color("#F0BD3D"),p[3]=color("#C32227"),p[4]=color("#D0679A"),p[5]=color("#7D4073"),p[6]=color("#403357"),p[7]=color("#171E3A"),p[8]=color("#51558F")):4==p_num?(background("#F1E4DD"),pb=color("#F1E4DD"),p[0]=color("#080300"),p[1]=color("#4A1807"),p[2]=color("#891C06"),p[3]=color("#B83412"),p[4]=color("#E06929"),p[5]=color("#F3B353"),p[6]=color("#BCA638"),p[7]=color("#6C6C0E"),p[8]=color("#31270D")):5==p_num?(background("#F0F4EB"),pb=color("#F0F4EB"),p[0]=color("#AC5435"),p[1]=color("#D77F56"),p[2]=color("#EBAE9B"),p[3]=color("#E3DFDE"),p[4]=color("#92D6ED"),p[5]=color("#027FB5"),p[6]=color("#044772"),p[7]=color("#041830"),p[8]=color("#4D4246")):6==p_num&&(background("#F3E0CC"),pb=color("#F3E0CC"),p[0]=color("#090908"),p[1]=color("#0B2247"),p[2]=color("#205B33"),p[3]=color("#607600"),p[4]=color("#FFA314"),p[5]=color("#F32F1D"),p[6]=color("#AC0048"),p[7]=color("#7A0062"),p[8]=color("#37007A")),draw_times=[];for(let e=0;e<num_layers;e++){o=(shape_rand=R.rd())<.2?"cloud":shape_rand<.4?"cylinder":shape_rand<.6?"sphere":shape_rand<.7?"cube":shape_rand<.8?"urchin":shape_rand<.9?"rings":"spiral",init_pts=[],final_pts=[],gen_size=brush_gen_size,buffer=.003,genInitPoints(o),updateExpressions("blah"),unbuffered_pts=mapPts();for(let $=0;$<unbuffered_pts.length;$++)unbuffered_pts[$].push(e);brush_pts=brush_pts.concat(unbuffered_pts)}grid_size=200,buffered_pts=bufferPts(spreaded_pts=spreadPts(fitted_pts=fitPts(brush_pts))),grid_size=200,brush_pts=final_pts=spreadPts(buffered_pts,!1),z_list=[];for(let t=0;t<brush_pts.length;t++)z_list.push(brush_pts[t][2]);for(let r=0;r<brush_pts.length;r++)rand=((rand=R.rd())+.1*sin(TWO_PI*(z-rand))+1)%1,brush_pts[r][6]=rand;brush_pts.sort((e,$)=>e[6]-$[6]);for(let s=0;s<brush_pts.length;s++)brush_pts[s][6]=s/brush_pts.length;brush_pts.sort((e,$)=>e[2]-$[2]);for(let _=0;_<brush_pts.length;_++)brush_pts[_][2]=1-_/brush_pts.length;for(let n=0;n<num_layers;n++){var o;if(aspect_ratio=1,margin=0,o=(shape_rand=R.rd())<.2?"cloud":shape_rand<.4?"cylinder":shape_rand<.6?"sphere":shape_rand<.7?"cube":shape_rand<.8?"urchin":shape_rand<.9?"rings":"spiral",gen_size=5,init_pts=[],final_pts2=[],genInitPoints(o),updateExpressions("blah"),unbuffered_pts=fitPts(unfitted_pts=mapPts()),buffer_strokes)buffered_pts=bufferPts(unbuffered_pts,0);else{buffered_pts=unbuffered_pts;for(let l=0;l<buffered_pts.length;l++)buffered_pts[l][5]=1}grid_size=200,final_pts2=spreadPts(buffered_pts),stroke_pts.push(final_pts2)}updateExpressions("blah"),trail_length=1,buffer=.1,init_pts=[],theta_off=R.rd()*TWO_PI;for(let h=0;h<shape_sides;h++)theta=map(h,0,shape_sides,0,TWO_PI)+theta_off,init_pts.push([.5*cos(theta),.5*sin(theta),-.5,0]);for(poly_pts=buffered_pts=bufferPts(unbuffered_pts=fitPts(mapPts(),!0));isNaN(polyArea(poly_pts))||1e-8>polyArea(poly_pts);)updateExpressions("blah"),poly_pts=buffered_pts=bufferPts(unbuffered_pts=fitPts(mapPts(),!0));poly_scale=sqrt(shape_size)/sqrt(polyArea(poly_pts));for(let u=0;u<poly_pts.length;u++)rad=len(poly_pts[u][0],poly_pts[u][1],.5,.5),.5!=poly_pts[u][0]?(theta=atan((poly_pts[u][1]-.5)/(poly_pts[u][0]-.5)),poly_pts[u][0]<.5&&(theta+=PI)):theta=poly_pts[u][1]>.5?PI/2:1.5*PI,poly_pts[u][2]=rad,poly_pts[u][3]=theta;poly_pt_list.push(poly_pts),noStroke(),strokeWeight(.001*unit),aspect_ratio=16/9;for(let g=0;g<1e4;g++){x=map(R.rd(),0,1,-.1,aspect_ratio+.1),y=map(R.rd(),0,1,-.1,1.1),fill(lerpColor(pb,fill_color=p[floor(p.length*R.rd())],.04)),theta=final_pts2[floor(R.rd()*final_pts2.length)][3],beginShape();for(let d=0;d<poly_pts.length;d++)vertex((px=x+poly_pts[d][2]*cos(poly_pts[d][3]+theta)*.2*poly_scale)*unit,(py=y+poly_pts[d][2]*sin(poly_pts[d][3]+theta)*.2*poly_scale)*unit);endShape()}for(let a=0;a<p.length;a++)p[a].setAlpha(229.5);for(let c=0;c<brush_pts.length;c++){x1=brush_pts[c][0],y1=brush_pts[c][1],z=brush_pts[c][2],theta=brush_pts[c][3],layer_num=brush_pts[c][4],c_rand2=brush_pts[c][6];for(let b=0;b<stroke_pts[layer_num].length;b++)x=stroke_pts[layer_num][b][0],y=stroke_pts[layer_num][b][1],z2=stroke_pts[layer_num][b][2],theta2=stroke_pts[layer_num][b][3],size_scale=stroke_pts[layer_num][b][5],c_rand=(color_rand=R.rd())<(small_color_prob=high_stroke_color?.2:num_layers>1?map(layer_num,0,num_layers-1,.4,.8):.5)?floor(p.length*((c1_mult*(z+z2)*2/max(num_layers,2)+9+c1_offset+map(layer_num,0,num_layers,0,1)+.2*R.rd()-.2*R.rd())%1)):floor(p.length*((c2_mult*c_rand2+9+c2_offset+.1*R.rd()-.1*R.rd())%1)),draw_time=(3*z+map(tan(map(z2,0,1,-PI/4,PI/4)),-1,1,0,1))/4+1e-4*b,draw_times.push([x1,y1,z,theta,x,y,z2,theta2,size_scale,c_rand,draw_time,layer_num])}draw_times.sort((e,$)=>e[10]-$[10]),min_draw_time=draw_times[0][10];for(let E=0;E<draw_times.length;E++)draw_times[E][10]+=.02-min_draw_time}function genInitPoints(e){if("cloud"==e)for(let $=0;$<pow(gen_size,3);$++)x=sqabs(2*(R.rd()-.5)),y=sqabs(2*(R.rd()-.5)),z=sqabs(2*(R.rd()-.5)),init_pts.push([x,y,z]);if("cylinder"==e)for(let t=0;t<pow(gen_size,3);t++)x=(rad=.5)*cos(theta=map(R.rd(),0,1,0,TWO_PI)),y=rad*sin(theta),z=R.rd()-.5,init_pts.push([x,y,z]);if("sphere"==e)for(let r=0;r<pow(gen_size,3);r++)theta=TWO_PI*R.rd(),x=(rad=.5)*sin(phi=acos(1-2*R.rd()))*cos(theta),y=rad*sin(phi)*sin(theta),z=rad*cos(phi),init_pts.push([x,y,z]);if("cube"==e)for(let s=0;s<gen_size;s++)for(let _=0;_<gen_size;_++)for(let n=0;n<gen_size;n++)x=map(s,0,gen_size-1,-1,1)+1/gen_size*(R.rd()-R.rd()),y=map(_,0,gen_size-1,-1,1)+1/gen_size*(R.rd()-R.rd()),z=map(n,0,gen_size-1,-1,1)+1/gen_size*(R.rd()-R.rd()),init_pts.push([x,y,z]);if("urchin"==e)for(let o=0;o<pow(gen_size,1.5);o++){theta=TWO_PI*R.rd(),x=0*sin(phi=acos(1-2*R.rd()))*cos(theta),y=0*sin(phi)*sin(theta),z=0*cos(phi);for(let l=0;l<pow(gen_size,1.5);l++)theta+=.1*cos(twist=TWO_PI*R.rd()),phi+=.1*sin(twist),x+=(v=.01)*sin(phi)*cos(theta),y+=v*sin(phi)*sin(theta),z+=v*cos(phi),init_pts.push([x,y,z])}if("rings"==e){theta=TWO_PI*R.rd(),phi=acos(1-2*R.rd());for(let h=0;h<gen_size;h++){theta+=.1*cos(twist=TWO_PI*R.rd()),phi+=.1*sin(twist),rad=map(h,-1,gen_size-1,0,1);for(let u=0;u<sq(gen_size);u++)psi=map(u,0,sq(gen_size),0,TWO_PI),x=rad*cos(phi)*cos(psi)*cos(theta)+sin(psi)*sin(theta),y=rad*sin(phi)*cos(psi),z=rad*sin(psi)*cos(theta)+cos(phi)*cos(psi)*sin(theta),init_pts.push([x,y,z])}}if("spiral"==e)for(let g=0;g<pow(gen_size,3);g++)x=(rad=(theta=map(R.rd(),0,1,0,10*PI))/(10*PI))*cos(theta+TWO_PI*(z=R.rd()-.5)),y=rad*sin(theta+TWO_PI*z),init_pts.push([x,y,z])}