0xbc89166f…a698sent to0xa7d8d9ef…d270·#15,209,704·view on Etherscan
function resetValues(){let e;switch(R=new Random,stickers=!1,R.r_b(.7)?(bti=R.r_i(0,5),R.r_b(.05)&&(bti=6),1==bti&&loop(),bti<4&&(stickers=R.r_b(.444))):R.r_b(.7)?specialText=!0:splitText=!0,textItalic=R.r_b(.1),textItalic?(textStyle(BOLDITALIC),stickers=!1):textStyle(BOLD),(splitText||specialText)&&(bti=0,textStyle(BOLD)),stickers&&(stickerTypeIndex=R.r_i(0,1)),bti){case 0:e=R.r_c(solidPalette),bc1=color(e.bgc),txtc=color(e.txtc),shadowColor=color(e.sdc);break;case 1:loop(),e=R.r_c(gradientPalette),createOrbs(e.gcs),setGradientColors(e);break;case 2:case 3:case 4:e=R.r_c(gradientPalette),setGradientColors(e),shadowColor=bc1;break;case 5:noLoop(),e=R.r_c(checkersPalette),txtc=color(e.txtc),bc1=color(e.bgc),bc2=color(e.ckc),shadowColor=color(e.sdc),stickers=!1,shadow=!0;break;case 6:loop(),e=R.r_c(heartPalette),txtc=color(e.txtc),shadowColor=color(e.sdc),heartColorStrings=e.hcs,stickers=!1,shadow=!0,heartRings=[];let t=0;for(i=4*WIDTH;i>0;i-=WIDTH/7){let e=color(heartColorStrings[t]),r=i;heartRings.push(new GrowingHeart(WIDTH/2,HEIGHT/2-r/2,r,e)),t=(t+1)%heartColorStrings.length}}if(specialText)switch(specialTextIndex=R.r_c([0,1,1,2,2,3,3]),loop(),specialTextIndex){case 0:textSizeVal=.088*WIDTH;let t=ns.concat(np,adj,aan,vrb),r=R.r_c(t);for(;r.split(" ").length>=2||r.length<=8||r.length>=14;)r=R.r_c(t);let c="";for(let e=0;e<7;e++)c=c+r+" ";newString=c.toUpperCase();break;case 1:specialTextWavy=R.r_b(.5),newString=createNewString(),textSizeVal=.038*WIDTH;let s=60;for(specialTextWavy&&(s=36),textSize(textSizeVal);textWidth(newString)>=.7*WIDTH||newString.length<32||newString.length>s;)newString=createNewString();break;case 2:candyHearts=[];let n=R.r_c(["flower","heart","star"]),a=e.sdc;if(R.r_b(.5)){for(let e=0;e<9;e++){let e=np.concat(ns),t=R.r_c(e);t=t.charAt(0).toUpperCase()+t.slice(1),candyHearts.push(new CandyHeart(t,a,n))}newString=R.r_c(invitations)}else{for(let e=0;e<9;e++){let e=adj.concat(aan);candyHearts.push(new CandyHeart("I am "+R.r_c(e),a,n))}newString=R.r_c(affirmations)}textSizeVal=.0555*WIDTH;break;case 3:let i="",o=27;for(let e=0;e<o;e++){let t=R.r_c(instructions);i=e<o-1?i+t.charAt(0).toUpperCase()+t.slice(1)+". ":i+t.charAt(0).toUpperCase()+t.slice(1)+"."}newString=i,textSizeVal=.0444*WIDTH,textSize(textSizeVal),noLoop()}else{newString=createNewString(),txtsi=textSizeOptions.length-1,idw=newString.split(" ");let e=findLongestWord(idw);if(numWords=idw.length,splitText){for(centerSticker=R.r_i(0,2),smileyType=R.r_i(0,2),stickers=!1,noLoop();numWords<=4||numWords>=10||e.length>=8;)newString=createNewString(),idw=newString.split(" "),e=findLongestWord(idw),numWords=idw.length;textSizeVal=.0777*WIDTH}else e.length>=13&&12==bti?txtsi=0:e.length>=13?txtsi=1:e.length>=12||numWords>=10?txtsi=2:e.length>=9||numWords>=8?txtsi=3:numWords>=7||e.length>=8||e>=8&&""!=punctuation?txtsi=4:numWords>=6?(txtsi=5,stickers=!1):e.length>=7||numWords>=5?(txtsi=6,stickers=!1):e.length>=6&&(txtsi=7,stickers=!1),e.length>=10&&(stickers=!1),textSizeVal=textSizeOptions[txtsi]*WIDTH}}function setGradientColors(e){txtc=color(e.txtc),R.r_b(.5)?(bc1=color(e.gcs[0]),bc2=color(e.gcs[1])):(bc1=color(e.gcs[1]),bc2=color(e.gcs[0]))}function drawCharacter(e,t,r,c){push(),fill(c),stroke(c),strokeWeight(.03*textSizeVal),textAlign(CENTER),text(e,t,r),pop()}function setGradient(e,t,r,c,s,n){noFill();for(let a=t;a<=t+c;a++){let i=map(a,t,t+c,0,1),o=lerpColor(s,n,i);stroke(o),line(e,a,e+r,a)}}function setRadialGradient(e,t,r,c,s,n){background(n),noFill();for(let a=0;a<=1.5*r;a++){let r=map(a,t,t+c,0,1),i=lerpColor(s,n,r);stroke(i),circle(e,t,a)}}function setRadialHeart(e,t,r,c,s,n,a){noFill();let i=.4;for(let c=0;c<=r*i;c++){let a=map(c,0,r*i,0,1),o=lerpColor(s,n,a);stroke(o),strokeWeight(5),heart1(e,t-c/2,c)}for(let c=r*i;c<=2*r;c++){let a=map(c,r*i,1.5*r,0,1),o=lerpColor(n,s,a);stroke(o),strokeWeight(5),heart1(e,t-c/2,c)}}function star(e,t,r,c,s){angleMode(RADIANS);let n=TWO_PI/s,a=n/2;beginShape();for(let s=0;s<TWO_PI;s+=n){let n=e+cos(s)*c,i=t+sin(s)*c;vertex(n,i),n=e+cos(s+a)*r,i=t+sin(s+a)*r,vertex(n,i)}endShape(CLOSE)}function sparkle(e,t,r,c){angleMode(RADIANS);let s=TWO_PI/4,n=s/2;beginShape();let a=.888*c,i=e+cos(0)*a,o=t+sin(0)*a;curveVertex(i,o),i=e+cos(0+n)*r,o=t+sin(0+n)*r,curveVertex(i,o),i=i=e+cos(s)*c,o=t+sin(s)*c,curveVertex(i,o),i=e+cos(s+n)*r,o=t+sin(s+n)*r,curveVertex(i,o),i=e+cos(2*s)*a,o=t+sin(2*s)*a,curveVertex(i,o),i=e+cos(2*s+n)*r,o=t+sin(2*s+n)*r,curveVertex(i,o),i=i=e+cos(3*s)*c,o=t+sin(3*s)*c,curveVertex(i,o),i=e+cos(3*s+n)*r,o=t+sin(3*s+n)*r,curveVertex(i,o),i=i=e+cos(4*s)*a,o=t+sin(4*s)*a,curveVertex(i,o),i=e+cos(4*s+n)*r,o=t+sin(4*s+n)*r,curveVertex(i,o),i=i=e+cos(5*s)*c,o=t+sin(5*s)*c,curveVertex(i,o),endShape()}function heart1(e,t,r){beginShape(),vertex(e,t+.1*r),bezierVertex(e-.35*r,t-.45*r,e-1.25*r,t+.2*r,e,t+1.05*r),bezierVertex(e+1.25*r,t+.2*r,e+.35*r,t-.45*r,e,t+.1*r),endShape(CLOSE)}function heart2(e,t,r){push();let c=0,s=[];for(angleMode(RADIANS);c<TWO_PI;){beginShape();for(let e of s)vertex(e.x,e.y);endShape();const n=r,a=16*n*pow(sin(c),3),i=-n*(13*cos(c)-5*cos(2*c)-2*cos(3*c)-cos(4*c));s.push(createVector(e+a,t+i)),c+=.01}pop()}function heart3(e,t,r){beginShape(),vertex(e,t),bezierVertex(e-r/2,t-.55*r,e-1.25*r,t+.3*r,e,t+r),bezierVertex(e+1.25*r,t+.3*r,e+r/2,t-.55*r,e,t),endShape(CLOSE)}function cuteFace(e,t,r,c,s){angleMode(RADIANS);var n=.1*PI,a=.9*PI,i=.04*r;stroke(c),strokeWeight(.04*textSizeVal),noFill(),arc(e,t,i,i,n,a);var o=.027*r,l=.016*r;if(0==s||1==s)fill(c),ellipse(e-o,t-o,l,1*l);else{var p=0,d=PI;noFill(),arc(e-o,t-o,l,l,d,p)}if(0==s||2==s)fill(c),ellipse(e+o,t-o,l,1*l);else{p=0,d=PI;noFill(),arc(e+o,t-o,l,l,d,p)}}function flower5Cutout(e,t,r,c,s){push(),angleMode(RADIANS),strokeWeight(2),fill(s),flower5(e,t,r),fill(c),circle(e,t,1.3*r),pop()}function flower5(e,t,r){push(),angleMode(RADIANS),translate(e,t);for(let e=0;e<6;e++)ellipse(0,r,1.1*r,1.2*r),rotate(PI/3);pop()}function findLongestWord(e){let t=e[0];for(let r=0;r<e.length;r++)e[r].length>t.length&&(t=e[r]);return t}function createNewString(){let e=R.r_c(punctuationOptions);stickers&&(e="");let t=R.r_c(sentenceStructures),r="";interjection=R.r_b(.1),interjection&&(t.splice(0,0,","),t.splice(0,0,"intrj"));for(let e=0;e<t.length;e++){let c=!0,s="";switch(t[e]){case"np":s=R.r_c(np);break;case"ns":s=R.r_c(ns);break;case"nouns_mixed":let r=np.concat(ns);s=R.r_c(r);break;case"wp":s=R.r_c(wp);break;case"ws":s=R.r_c(ws);break;case"adv":s=R.r_c(adv);break;case"adj":s=R.r_c(adj);break;case"aan":s=R.r_c(aan);break;case"amx":let c=adj.concat(aan);s=R.r_c(c);break;case"vrb":s=R.r_c(vrb);break;case"ving":s=R.r_c(ving);break;case"ved":s=R.r_c(ved);break;case"vs":s=R.r_c(vs);break;case"instructions":s=R.r_c(instructions);break;case"dobj":s=R.r_c(dobj);break;case"tms":s=R.r_c(tms);break;case"dtm":s=R.r_c(dtm);break;case"intrj":s=R.r_c(intrj);break;case"aer":s=R.r_c(aer);break;case"as":s=R.r_c(as);break;default:s=t[e]}r+=s,nspc&&nspc.indexOf(t[e+1])>=0&&(c=!1),e<t.length-1&&c&&(r+=" ")}return r+=e,r=r.toUpperCase(),r=r.replace(/i /g,"I "),r=r.replace(/i'/g,"I'"),r}function createOrbs(e){let t=0;particles=[];let r=.9*WIDTH,c=.4*WIDTH;for(let s=0;s<11;s++){const n=new Orb(R.r_d()*WIDTH,R.r_d()*HEIGHT,R.r_d()*(r-c)+c,e[t]);++t>=e.length&&(t=0),particles[s]=n}}function genNote(){let e=adj.concat(aan);return R.r_c(intrj)+", u are "+R.r_c(e)+" <3"}