let sw=window.innerWidth,sh=window.innerHeight,nd=(Date.now()/1e3-mt)/550;var grCl,gr=[],grLn=nd/2e3<=15?nd/2e3:15;grLn<1&&(grlen=1);let dyc=0,pal=[["rgb(139, 191, 0)","rgb(168, 227, 20)","rgb(168, 227, 20)","rgb(51, 66, 12)"],["rgb(245,185,224)","rgb(226,129,207)","rgb(226,129,207)","rgb(78,17,53)"],["rgb(161,122,65)","rgb(231,216,211)","rgb(138,91,35)","rgb(68,29,15)"],["rgb(242,239,222)","rgb(126,137,61)","rgb(56,72,25)","rgb(65,59,47)"],["rgb(139, 191, 0)","rgb(168, 227, 20)","rgb(168, 227, 20)","rgb(51, 66, 12)"],["#6FA09B","rgb(29,204,144)","rgb(36,68,49)","rgb(5,40,28)"]],trks=["rgb(20,20,20)","rgb(40,40,40)","rgb(50,40,40)","rgb(114,114,114)","rgb(37,20,12)"],gres=["rgb(24,54,23)","rgb(37,90,25)","rgb(93,75,54)","rgb(40,65,4)"];function setup(){createCanvas(sw,sh),randomSeed(ms),angleMode(RADIANS),grCl=color(gres[gc]);for(var r=0;r<=20;r+=1)gr.push(new Grs(createVector(width/2,height)))}function draw(){let r=a1;background(10,10,10);let $=ranB(70,120),_=ranB(15,45),n=PI/r,g=new Brnc([sw/2,sh],_,$,n,0);strokeWeight(_),stroke(30),br(g),noLoop(),stroke(grCl,random(50,200));for(var t=0;t<gr.length;t++)gr[t].draw()}function br(r){let{stp:$,wgt:_,ln:n,angle:g,prC:t}=r,s=$[0]+n*cos(g),b=$[1]-n*sin(g),e=[s,b];strokeWeight(_),t>16?stroke(pal[pc][0]):t>13?stroke(pal[pc][1]):t>12?stroke(pal[pc][2]):t>7?stroke(pal[pc][3]):stroke(trks[trC]),line($[0],$[1],e[0],e[1]);let i=g+PI/4,l=g-PI/4,a=ranB(0,i-l-PI/16),h=ranB(.5*_,.8*_),c=ranB(.7*n,.9*n);if(c<3||dyc>=nd)return;dyc++;let o=new Brnc(e,h,c,i-a/2,t+1),d=new Brnc(e,h,c,l+a/2,t+1);br(o),br(d)}class Brnc{constructor(r,$,_,n,g){this.stp=r,this.wgt=$,this.ln=_,this.angle=n,this.prC=g}}function ranB(r,$){return random($-r)+r}function Grs(r){this.blades=[],this.am=int(random(1,5)),this.loc=r,this.loc.x=this.loc.x+random(-30,30);for(var $=0;$<this.am;$++)this.blades.push(new Bld(random(1,grLn)));Grs.prototype.draw=function(){for(var r=0;r<this.blades.length;r++){var $=this.blades[r];push(),translate(this.loc.x,this.loc.y),rotate(radians($.angle)),$.br($.segments),pop()}}}function Bld(r){this.segments=r,this.angle=random(-10,10),this.br=function(r){var r=.79*r;strokeWeight(1),line(0,0,0,-r),push(),translate(0,-r),r>5&&(rotate(radians(this.angle+sin(r+0))),this.br(r)),pop()}}
Inscription number 55,425,824
Genesis block 825,853
File type text
File size 2.2 KB
Creation date