0x2c0c7cd1…2a00sent to0x9f79e46a…7794·#17,501,815·view on Etherscan
let hash=tokenData.hash;class Random{constructor(){this.useA=!1;let n=function(n){let o=parseInt(n.substring(0,8),16),e=parseInt(n.substring(8,16),16),t=parseInt(n.substring(16,24),16),r=parseInt(n.substring(24,32),16);return function(){t|=0;let n=((o|=0)+(e|=0)|0)+(r|=0)|0;return r=r+1|0,o=e^e>>>9,e=t+(t<<3)|0,t=(t=t<<21|t>>>11)+n|0,(n>>>0)/4294967296}};this.prngA=new n(tokenData.hash.substring(2,34)),this.prngB=new n(tokenData.hash.substring(34,66));for(let o=0;o<1e6;o+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(n,o){return n+(o-n)*this.random_dec()}random_int(n,o){return Math.floor(this.random_num(n,o+1))}random_bool(n){return this.random_dec()<n}random_choice(n){return n[this.random_int(0,n.length-1)]}}let R=new Random;const storonaCoef=.707;let storonaH,storonaW,colors,chosenPalette,sc,myStrokeweight;const l_x_off=.09,l_s_off=.1,c_s_off=.5;let sunCol,h_f_col,sm_dir,sm_xoffs=[],ppS=[],sm_w_coef,sonce=!1,litak=!1,pln_x,pln_y,pln_angle,pln_count,pln_alpha,picScale=3400,birds=!1,TEXTURE,BG,SUN,BIRDS,SCENE,PLANE,FLOWERS,RIVER,WHEATDIRECTION,tex,reka=!1,scn,wheatDir,flowers=!1,osnova,osnovaCh,NS;function sun(n,o,e){stroke(sunCol),myStrokeweight=map(e,.1*height,.3*height,3,5);let t=R.random_int(17,25),r=e/2,s=r/t,$;for(let i=1;i<t;i++)myLine(n-($=2*sqrt(r*r-s*i*s*i))/2,o+s*i,n+$/2,o+s*i),myLine(n-$/2,o-s*i,n+$/2,o-s*i);myLine(n-e/2,o,n+e/2,o)}function river(){let n=500*R.random_dec(),o=0,e=R.random_int(8,12),t,r=R.random_int(10*sc,20*sc),s=R.random_int(-.3,.3);myStrokeweight=7,push(),translate(R.random_int(.3*width,.7*width),osnova);for(let $=0;$<160;$++)stroke(R.random_int(200,210),R.random_int(55,65),R.random_int(80,90)),t=map($,0,100,2*r,2*r*e),myLine(o,$*sc*5,o+t,$*sc*5),o+=noise(n)*sc*40-.5*sc*40+5*sc*s,n+=.17;pop()}function mountain(){for(let n=0;n<6;n++){let o=R.random_dec()*width,e=osnova,t=R.random_int(55,80),r=R.random_int(.5*height,.8*height);stroke(R.random_int(25,35)-3*n),myStrokeweight=4;let s;for(let $=0;$<t;$++)$>.7*t&&stroke(95),myLine(o-(s=map($,0,t,r,0))/2,e-7*sc*$,o+s/2,e-7*sc*$)}}function hills(){for(let n=0;n<4;n++){let o=R.random_int(.1*width,.9*width),e=osnova,t=R.random_int(20,45),r=14*t*sc;myStrokeweight=4;let s=r/2,$=s/t,i,a;for(let c=0;c<t;c++)a=map(c,0,t-1,r/2,0),i=2*sqrt(s*s-$*c*$*c),stroke(R.random_int(75,90),R.random_int(25,30)+10*n,R.random_int(70,80)-3*n),myLine(o-i/2-a,e-$*c,o+i/2+a,e-$*c);push(),translate(o,e-$*t),.5>R.random_dec()&&vetryak(n),pop()}}function vetryak(n){stroke(90+5*n);let o,e,t=map(n,0,3,.6,1);myStrokeweight=4*t;for(let r=0;r<50;r++)myLine(-(e=map(r,0,50,15*sc,5*sc))*t,-r*sc*7*t,e*t,-r*sc*7*t),o=-r*sc*7*t;push(),translate(0,o),push();let s=R.random_dec()*TWO_PI;for(let $=0;$<3;$++){let i;push(),rotate(s+TWO_PI/3*$);for(let a=0;a<35;a++)myLine(-(i=a<=10?map(a,0,10,5*sc,7*sc):map(a,11,35,7*sc,2*sc))*t,-a*sc*7*t,i*t,-a*sc*7*t);pop()}pop(),pop()}function buildings(){let n=R.random_int(10,15);for(let o=0;o<n;o++)stroke(h_f_col),house(R.random_dec()*width*.9,osnova,1)}function factory(){stroke(h_f_col);for(let n=0;n<4;n++)house(R.random_dec()*width*.9,osnova,0);for(let o=0;o<3;o++)ppS.push(R.random_int(40,55));ppS.sort(function(n,o){return n-o}),reverse(ppS);for(let e=0;e<3;e++)pipe(R.random_num(.1*width,.9*width),osnova,ppS[e])}function house(n,o,e){let t,r;1==e?(t=R.random_int(25,45),r=R.random_int(7,18)):(t=R.random_int(7,18),r=R.random_int(25,48));let s=10*sc,$=s*r,i=s*t,a=R.random_dec();if(myStrokeweight=4,.5>R.random_dec()){if(a<.33)for(let c=0;c<t+1;c++)myLine(n,o-s*c,n+$,o-s*c);else if(a>.66)for(let m=0;m<r+1;m++)myLine(n+s*m,o,n+s*m,o-i);else{for(let d=0;d<t+1;d++)myLine(n,o-s*d,n+$,o-s*d);for(let l=0;l<r+1;l++)myLine(n+s*l,o,n+s*l,o-i)}}else if(a<.33)for(let _=0;_<r;_++)for(let f=0;f<t;f++)myLine(n+s*_,o-s*f,n+s*_+s,o-s*f-s);else if(a>.66)for(let u=0;u<r;u++)for(let h=0;h<t;h++)myLine(n+s*u+s,o-s*h,n+s*u,o-s*h-s);else{for(let y=0;y<r;y++)for(let L=0;L<t;L++)myLine(n+s*y,o-s*L,n+s*y+s,o-s*L-s);for(let p=0;p<r;p++)for(let g=0;g<t;g++)myLine(n+s*p+s,o-s*g,n+s*p,o-s*g-s)}myLine(n,o,n,o-t*s),myLine(n+r*s,o,n+r*s,o-t*s),myLine(n,o-t*s,n+r*s,o-t*s)}function pipe(n,o,e){push(),translate(n,o);let t=e,r=R.random_num(20*sc,30*sc),s=.3*r/t;myStrokeweight=6;for(let $=0;$<t;$++)$<round(.17*t)||$<round(.5*t)&&$>round(.33*t)||$>round(.75*t)?stroke(R.random_int(10,15),R.random_int(55,75),R.random_int(80,90)):stroke(100),$==t-2||$==t-3?myLine(-r-20*s,-$*sc*10,r+20*s,-$*sc*10):myLine(-r,-$*sc*10,r,-$*sc*10),r-=s;.33>R.random_dec()&&smoke(-t*sc*10,r),pop()}function smoke(n,o){let e=500*R.random_dec(),t=0,r=R.random_int(4,8),s;push(),stroke(95),translate(-o,n);for(let $=0;$<100;$++)s=map($,0,100,2*o,2*o*r),myLine(t,-$*sc*10,t+s,-$*sc*10),t+=noise(e)*sc*20-.5*sc*20+10*sc*sm_dir,e+=.5;pop()}function canvasBackground(){for(let n=0;n<height;n+=sc){let o=color(chosenPalette[0]),e=color("#5E5E5E"),t=map(n,0,height,0,1),r=lerpColor(o,e,t);push(),strokeWeight(sc),stroke(r),fill(r),rect(0,n,width,sc),pop()}}function wheatDraw(){let n=R.random_int(105,140);myStrokeweight=5;let o=R.random_int(40,80);for(let e=0;e<n+1;e++)stroke(R.random_int(o,o+10),R.random_int(55,75),R.random_int(80,90)),wheatDir<.5?myLine(width/n*e,osnova,width/n*e,height):myLine(0,osnova+width/n*e,width,osnova+width/n*e);if(flowers){let t=300+map(osnovaCh,0,.25*height,300,0);for(let r=0;r<t;r++){let s=R.random_int(0,width),$=R.random_int(osnova,height);stroke(R.random_int(0,30),R.random_int(55,75),R.random_int(80,90)),myLine(s,$,s,$+sc)}}}function myLine(n,o,e,t){let r=500*R.random_dec(),s=500*R.random_dec(),$=dist(n,o,e,t),i=[];push(),translate(n,o);rotate(atan2(t-o,e-n)-PI/2);let a=map(noise(r),0,1,-sc,sc);i.push(a),i.push(sc),r+=.09;for(let c=0;c<=ceil($/sc);c++)i.push(a=map(noise(r),0,1,-sc,sc)),i.push(c*sc),strokeWeight(sc*(myStrokeweight*(noise(s)+.5))),line(i[0],i[1],i[2],i[3]),i.shift(),i.shift(),r+=.09,s+=.1;pop()}function textures(){strokeWeight(height/3e3);for(let n=0;n<1e4;n++)push(),stroke(R.random_int(40,60),R.random_int(50,80),R.random_int(50,80),.05),translate(R.random_dec()*width,R.random_dec()*height),tex<.5?rotate(R.random_choice([0,PI/2])):rotate(R.random_num(0,TWO_PI)),line(-1.5*width,0,1.5*width,0),pop()}function grain(){loadPixels();let n;for(let o=0;o<pixels.length;o+=4)n=30*R.random_dec()-15,pixels[o]-=n,pixels[o+1]-=n,pixels[o+2]-=n;updatePixels()}function bird(){let n=R.random_num(4,7)*sc,o=R.random_choice([R.random_num(-PI/4.5,-PI/8),R.random_num(PI/8,PI/4.5)]);push(),translate(R.random_num(.05*width,.95*width),R.random_num(.05*height,.15*height+osnovaCh)),myStrokeweight=3,stroke(20);for(let e=0;e<2;e++)myLine(0,0,n*cos(e*PI+o+-2*o*e),n*sin(e*PI+o+-2*o*e));pop()}function pln(){let n;push(),myStrokeweight=5,stroke(20);let o=R.random_num(.1*width,.9*width);n=o<.5*width?1:-1,translate(o,R.random_num(.05*height,.1*height+osnovaCh)),rotate(n*PI/30*R.random_dec()),myLine(0,0,25*sc*n,0),myLine(25*sc*n,0,25*sc*n,-(5*sc)),myLine(5*sc*n,5*sc,15*sc*n,-(5*sc)),stroke(220),myStrokeweight=3,myLine(29*sc*n,3*sc,27*sc*n+width*n,3*sc),myLine(29*sc*n,-(3*sc),27*sc*n+width*n,-(3*sc)),pop()}function setup(){if(NS=9999999*R.random_dec(),windowWidth<.707*windowHeight?storonaH=(storonaW=windowWidth)/.707:storonaW=.707*(storonaH=windowHeight),pixelDensity(picScale/storonaH),sc=storonaH/1500,createCanvas(storonaW,storonaH),colorMode(HSB),colors=[["#FFFFFF","#1"],["#707070","#2"],["#EAD39C","#3"],["#A6DAFF","#4"],["#53849F","#5"],["#84A153","#6"],["#9f8440","#7"],["#BC7171","#8"],["#D89475","#9"],["#B7B366","#10"]],BG=(chosenPalette=R.random_choice(colors))[1],.2>R.random_dec()?(birds=!0,BIRDS="Yes"):BIRDS="No",TEXTURE=(tex=R.random_dec())<.5?"Cloth":"Paper",SCENE=(scn=R.random_dec())<.27?"City":scn>=.27&&scn<.54?"Factory":scn>=.54&&scn<.81?"Hils":"Mountains",.15>R.random_dec()?(litak=!0,PLANE="Yes"):PLANE="No",.5>R.random_dec()?(sonce=!0,SUN="Yes"):SUN="No",.1>R.random_dec()?(flowers=!0,FLOWERS="Yes"):FLOWERS="No",WHEATDIRECTION=(wheatDir=R.random_dec())<.5?"Vertical":"Horizonal",.2>R.random_dec()?(reka=!0,RIVER="Yes"):RIVER="No",noiseSeed(NS),sm_dir=R.random_num(-.3,.3),osnovaCh=.25*R.random_dec()*height,osnova=.6*height+osnovaCh,canvasBackground(),h_f_col=.5>R.random_dec()?20:100,sonce&&(sunCol=.8>R.random_dec()?color(R.random_int(0,50),R.random_int(55,75),R.random_int(80,90)):100,sun(R.random_num(.3*width,.7*width),R.random_num(.1*height,.2*height),R.random_num(.1*height,.3*height))),litak&&pln(),scn<.27?buildings():scn>=.27&&scn<.54?factory():scn>=.54&&scn<.81?hills():mountain(),birds)for(let n=0;n<R.random_int(4,8);n++)bird();wheatDraw(),reka&&river(),textures(),grain()}function draw(){}function keyPressed(){83===keyCode&&saveCanvas("Lines of Memories","png")}