0x2776621f…43f9sent to0x942bc2d3…5c8a·#15,828,998·view on Etherscan
let vi=1;for(let gi=0;gi<xr.length;++gi){let Ti=Jr-xr[gi][0],yi=Kr-xr[gi][1],mi=s(Ti*Ti+yi*yi)-Dr+.1*re();mi<vi&&(vi=mi)}for(let xi=0;xi<gr.length;++xi)for(let Ai=0;Ai<gr[xi].length;Ai+=5){let ki=gr[xi][Ai][0]-Jr,Si=gr[xi][Ai][1]-Kr,Di=s(ki*ki+Si*Si)-Er;Di<vi&&(vi=Di)}if(!(vi>.007)){Zr=!1;break}Xr.unshift([Jr,Kr,-di[1]/pi,di[0]/pi])}}(Zr||Xr.length>10)&&(gr.push(Xr),Tr.push(1+h(4*f(re(),2))),yr.push(Qr))}}else if(0==be){let Ei=20,Pi=he?.02:.01;if(me){let wi=!1;for(let Bi=0;Bi<Ei||0==wi;++Bi){let Ri=(re()-.5)*ge,Li=(re()-.5)*ve,Ni=h(4*re()),Ci=Ri,Fi=Li;for(;(Ri-Ci)*(Ri-Ci)+(Li-Fi)*(Li-Fi)<.4;)Ci=2*(re()-.5),Fi=2*(re()-.5);let _i=s((Ri-Ci)*(Ri-Ci)+(Li-Fi)*(Li-Fi)),Ii=h(40*re())+3,Gi=h(3*re())+1;for(let Mi=0;Mi<Ii;Mi+=Gi){let Ui=Mi/(Ii-1),Vi=Ri+(Ci-Ri)*Ui,Oi=Li+(Fi-Li)*Ui,Wi=_i/Ii*.5;for(let zi=0;zi<xr.length;++zi){let Hi=Vi-xr[zi][0],Yi=Oi-xr[zi][1],qi=s(Hi*Hi+Yi*Yi)-Dr;qi<Wi&&(Wi=qi)}if(Wi>0){for(let Xi=0;Xi<mr.length;++Xi){let ji=mr[Xi][0]-Vi,Ji=mr[Xi][1]-Oi,Ki=mr[Xi][2],Qi=s(ji*ji+Ji*Ji)-Ki;if(Ki>.1&&Qi<.3*-Ki)u(Qi+.3*Ki)<Wi&&(Wi=u(Qi+.3*Ki));else{if(!(Qi>0)){Wi=0;break}if(u(Qi)<Wi){Wi=u(Qi),Wi=0;break}}}if(y.n3(Vi,Oi,.654)<0)continue;if(Wi>Pi){wi=!0;let Zi=10+h(10*re()),$i=re()>.1?100:h(3*re())+3;if(mr.push([Vi,Oi,Wi,Zi,0,Ni,$i]),Wi<10*Pi&&re()>pe){let el=new T(Vi,Oi,0,re(),c(.3*Wi,.01),0,0);ee.push(el)}Wi>10*Pi&&re()>.5&&(re()>.5?mr.push([Vi,Oi,.5*Wi,h(Zi/2)+1,0,Ni,$i]):(mr.push([Vi,Oi,.6*Wi,h(Zi/2)+1,0,Ni,$i]),mr.push([Vi,Oi,.3*Wi,h(Zi/2)+1,0,Ni,$i])))}}}}}Ei=1e5;for(let tl=0;tl<Ei;++tl){let rl=(re()-.5)*ge,il=(re()-.5)*ve;Le&&(rl=(h(50*re())/50-.5)*ge,il=(h(50*re())/50-.5)*ve);let ll=kr(rl,il,ze);rl=ll[0],il=ll[1];let nl=Sr(rl,il,We);rl=nl[0],il=nl[1];let al=f(rl*rl+il*il,.2);Pe&&(al=0);let ol=c(.3*re()+.1,de*(1-.8*al));ye&&(ol=.2*(.5*y.n3(rl*r*3,il*r*3,2.5)+.5)*de+.01);let fl=.11;for(let sl=0;sl<xr.length;++sl){let hl=rl-xr[sl][0],ul=il-xr[sl][1],cl=s(hl*hl+ul*ul)-Dr;cl<ol&&(ol=cl,fl=cl)}if(ol>0){for(let bl=0;bl<mr.length;++bl){let dl=mr[bl][0]-rl,pl=mr[bl][1]-il,vl=mr[bl][2],gl=s(dl*dl+pl*pl)-vl;if(vl>.1&&gl<.3*-vl)u(gl+.3*vl)<ol&&(ol=u(gl+.3*vl));else{if(!(gl>0)){ol=0;break}if(u(gl)<ol&&(ol=u(gl),ye)){ol=0;break}}}if(y.n3(rl,il,.654)<0&&fl>.1){if(re()>.99&&ol>.02){let Tl=.001,yl=new T(rl,il,-.01,re(),Tl,0);pr.push(yl)}continue}if(ol>Pi){let ml=10+h(10*re()),xl=h(4*(y.n3(rl*r*.1,il*r*5.1,2.54)+1));Te&&(xl=h(15*wr(rl,il)));let Al=re()>.1?100:h(3*re())+3;if(mr.push([rl,il,ol,ml,0,xl,Al]),ol<10*Pi&&re()>pe){let kl=new T(rl,il,0,re(),c(.3*ol,.01),0,0);Ae&&(kl.s*=2.5),ee.push(kl)}ol>10*Pi&&re()>.5&&(re()>.5?mr.push([rl,il,.5*ol,h(ml/2)+1,0,xl,Al]):(mr.push([rl,il,.6*ol,h(ml/2)+1,0,xl,Al]),mr.push([rl,il,.3*ol,h(ml/2)+1,0,xl,Al])))}}}}let Pr=500;for(let Sl=0;Sl<Pr;++Sl){let Dl=2*(re()-.5),El=2*(re()-.5),Pl=.5*re()+.01,wl=new T(Dl,El,-.005,re(),Pl,0);wl.frac2=Ne?.02:.05,pr.push(wl)}Pr=100+4e3*re();for(let Bl=0;Bl<Pr;++Bl){let Rl=2*(re()-.5),Ll=2*(re()-.5);if(y.n3(Rl,Ll,.654)<0){let Nl=.001,Cl=new T(Rl,Ll,-.01,re(),Nl,0);pr.push(Cl)}}function wr(e,t){let r=5;for(let i=0;i<xr.length;++i){let l=e-xr[i][0],n=t-xr[i][1],a=s(l*l+n*n)-.1;a<r&&(r=a)}return r}function Br(e,t,i=5.87){let l=Math.atan2(t,e),n=s(e*e+t*t),f=wr(e,t),h=wr(e+.001,t)-f,u=wr(e,t+.001)-f,c=s(h*h+u*u)*Ee*(1+20*f),b=.6*y.n3(e*r,t*r,i),d=.6*y.n3(e*r,t*r,-i);return Se&&(b*=5),De&&(d*=5),ke&&(b+=-o(l)/(1+n)+.2*a(l),d+=a(l)/(1+n)+.2*o(l)),Pe?[b+u/c,d-h/c]:[b-h/c,d-u/c]}function Rr(e){let t=e*n,i=a(l/ce)/a(t%(n/ce)-l/ce),f=a(ae*t)*i,s=o(oe*t)*i;f+=y.n3(a(t)*r,o(t)*r,.57)*fe*1,s+=y.n3(a(t)*r,o(t)*r,1.57)*fe*1,0!=se&&(f*=e*(1-e)*4,f+=5*(-.5+e));let h=Sr(f,s,Oe);return[.6*h[0],.6*h[1]]}function Lr(e,t,r,i,h){let c=Nr(e),d=Nr(e+.01),p=e*n*t+r+.5*l/4,v=a(p)*h,g=o(p)*h,T=c[0]+c[2]*v,y=c[1]+c[3]*v,m=100*(d[0]+d[2]*v-T),x=100*(d[1]+d[3]*v-y),A=s(m*m+x*x);return[T,y,g-.02*f(b(u(T),u(y)),3.8),-x/A,m/A]}function Nr(e){let t=Rr(e),r=Rr(e+.01),i=100*(r[0]-t[0]),l=100*(r[1]-t[1]),n=s(i*i+l*l);return[t[0],t[1],-l/n,i/n]}function Cr(e,t,r,i){let s=gr[r].length,h=(8*s+2)*(1+1*a(.001*dr+y.n3(r,.5,952.5)));for(let u=0;u<t;++u){let b=u/t*n+1*dr,d=[],p=(u+i)%t;for(let i=0;i<s;++i){let u=i/(s-1),v=f(u*(1-u)*4,.8)*e*c(1,s/20)*t/4,g=gr[r][i],T=u*n*h+b+.5*l/t,y=a(T)*v,m=o(T)*v,x=g[0]+g[2]*y,A=g[1]+g[3]*y;d.push(x,A,m,p)}at(d,r%3?.001:.002)}}function Fr(e){for(let t=0;t<e.length;++t)D.fillText(e[t],.5*Ye,(.62+.04*t)*qe)}function _r(e,t,r,i){D.strokeStyle="rgba(0,0,0,1)",D.lineWidth=Ke,D.beginPath(),D.moveTo(e+.2*r,t),D.lineTo(e,t+2*i),D.lineTo(e-r,t+3*i),D.lineTo(e-.7*r,t+3.7*i),D.lineTo(e,t+3*i),D.lineTo(e,t+5.7*i),D.lineTo(e+.5*r,t+5.7*i),D.lineTo(e+.5*r,t+3.2*i),D.moveTo(e+.5*r,t+5*i),D.lineTo(e+r,t+5*i),D.lineTo(e+r,t+3.5*i),D.moveTo(e+r,t+4.7*i),D.lineTo(e+1.5*r,t+4.7*i),D.lineTo(e+1.5*r,t+3.2*i),D.moveTo(e+1.5*r,t+4.3*i),D.lineTo(e+2*r,t+4.3*i),D.lineTo(e+2*r,t+2*i),D.lineTo(e+1.5*r,t+i),D.lineTo(e+1.5*r,t),D.stroke()}function Ir(e){if(requestAnimationFrame(Ir),D.clearRect(0,0,S.width,S.height),dr+=c(.001*(e-vr),.0333),vr=e,Z=[],$=[],Q=[],-1==Ge){for(let e=0;e<pr.length;++e){let t=pr[e];Q.push(t.frac,t.angle,0,t.frac2),Z.push(t.x,t.y,t.z,t.s),$.push(t.frac4)}for(let e=0;e<ee.length;++e){let t=ee[e],r=t.life/8;Q.push(t.frac%1,t.angle,t.range,t.frac2),Z.push(t.x,t.y,t.z,t.s*r),$.push(t.frac3),t.active&&(ee[e].life-=1)}}hr=Z.length/4,ee=ee.filter((e=>e.life>0));{E.bindFramebuffer(B,q),E.viewport(0,0,J,K);let e=Ge>=0?1:Ne?.1:.3;E.clear(E.DEPTH_BUFFER_BIT),Fe=-1!=Ge,nt(e,Ge>=0?1:.92)}{let e=-1!=Ge?0:8*$e/1e3;E.bindFramebuffer(B,j),E.viewport(0,0,J,K),E.clear(_),E.useProgram(mt),E.bindTexture(C,Y),E.bindBuffer(I,ar),E.vertexAttribPointer(Ct,2,R,!1,0,0),E.enableVertexAttribArray(Ct),E.enableVertexAttribArray(Ft),E.bindBuffer(I,sr),E.vertexAttribPointer(Ft,2,R,!1,0,0),E.uniform2f(_t,.5/J,0),E.uniform1f(It,e),E.drawArrays(w,0,6),E.bindFramebuffer(B,q),E.viewport(0,0,J,K),E.clear(_),E.bindTexture(C,X),E.uniform2f(_t,0,.5/K),E.drawArrays(w,0,6)}if(-1==Ge){let e=[],t=(h($e/200*(ae+oe)*ne),he?.015:.01);if(1==be)for(let e=0;e<gr.length;++e)Cr(t,Tr[e],e,yr[e]);else if(0==be)for(let e=0;e<mr.length;++e){let i=mr[e][0],l=mr[e][1],s=mr[e][5],b=.85*mr[e][2],d=h(2e3*b)+1,p=mr[e][3];mr[e][5],mr[e][4]+=.1*y.n3(i*r*5,l*r*5,e-.1*dr);let v=c(4,h(40*b)+1);for(let r=0;r<v;++r){let h=[],c=r/v*n+mr[e][4];for(let e=0;e<d;++e){let v=e/(d-1),g=v*n,T=i+a(g)*b,y=l+o(g)*b,m=a(g),x=-o(g),A=(f(u(v*(1-v)*4),.8),10*b*t),k=v*n*p+c,S=a(k)*A,D=o(k)*A;T+=-m*S,y+=x*S,h.push(T,y,D,(s+r)%4)}at(h,e%3?.001:.002)}}t=ue?.06:.04;for(let r=0;r<4;++r){let i=r/4,s=i*n+1*dr;for(let h=0;h<4;++h){let c=h/4*n+1*dr;e=[];let d=$e/10*(ae+oe)*ne,p=4*(ae+oe);for(let h=0;h<d;++h){let v=h/(d-1),g=1.5*t*(.8+.2*a(v*n+.1*dr)),y=Lr(1*v,p,c,0,g);g*=.3;let m=v*n*p*5+s+.5*l/4,x=a(m)*g,A=o(m)*g,k=y[0]+y[3]*x,S=y[1]+y[4]*x,D=f(b(u(k),u(S)),3.8),E=y[2]+A-.02*D;if(e.push(k,S,E,r),3==r&&re()<.08){let e=new T(k+.001*(re()-.5),S+.001*(re()-.5),-.01,i,.003,0,0,!0);e.life=8,e.frac3=850,ee.push(e)}}at(e,.001)}}}else{let e=dr-t,r=200,i=30;switch(D.font=Je+"px sans-serif",D.textAlign="center",D.textBaseline="middle",Ge){case 0:{let t=.15,r=d(c(1,e/2));D.fillStyle="black";for(let i=0;i<4;++i){let l=[],n=(i+1)/5,a=1.2*(1-r)+r*(2*n-1);l.push(-1,a,0,i),l.push(1,a,0,i),at(l,t),e>2&&D.fillText(A.name[i],.5*Ye,(1-n+.1)*qe)}e>2&&(D.fillText("INSTRUCTIONS (Step 1 of 10)",.5*Ye,.05*qe),D.fillText("Gather the following threads:",.5*Ye,.1*qe))}break;case 1:{let t=d(c(1,e/2)),r=.15*(1-t)+.01*t;if(e<2)for(let e=0;e<4;++e){let i=[],l=(e+1)/5,n=(1-t)*(2*l-1)+t*(.1*(2*l-1)+.05);i.push(-1,n,0,e),i.push(1,n,0,e),at(i,r)}else if(e>=2){let t=d(c(1,(e-2)/2));for(let e=0;e<4;++e){let i=[],l=.1*((e+1)/5*2-1)+.05;i.push(-.8,l,0,e),i.push(.8,l,0,e),at(i,r),i=[],i.push(-1.2,l,0,e),i.push(-.8-.2*t,l,0,e),at(i,r),i=[],i.push(.8+.2*t,l,0,e),i.push(1.2,l,0,e),at(i,r)}D.beginPath(),D.moveTo(.1*Ye,.4*qe),D.lineTo(.1*Ye,.55*qe),D.moveTo(.9*Ye,.4*qe),D.lineTo(.9*Ye,.55*qe),D.moveTo(.11*Ye,.55*qe),D.lineTo(.89*Ye,.55*qe),D.moveTo(.12*Ye,.54*qe),D.lineTo(.11*Ye,.55*qe),D.lineTo(.12*Ye,.56*qe),D.moveTo(.88*Ye,.54*qe),D.lineTo(.89*Ye,.55*qe),D.lineTo(.88*Ye,.56*qe),D.strokeStyle="rgba(0,0,0,"+t+")",D.lineWidth=Ke,D.stroke(),D.beginPath(),D.moveTo((.1-.01)*Ye,.57*qe),D.lineTo(.11*Ye,.6*qe),D.arc((.1+.02/3)*Ye,.59475*qe,.005*Ye,l/3,2*-l/3,!0),D.moveTo(.11*Ye,.57*qe),D.lineTo((.1-.01)*Ye,.6*qe),D.arc((.1-.02/3)*Ye,.59475*qe,.005*Ye,2*l/3,-l/3),D.moveTo(.89*Ye,.57*qe),D.lineTo(.91*Ye,.6*qe),D.arc((.9+.02/3)*Ye,.59475*qe,.005*Ye,l/3,2*-l/3,!0),D.moveTo(.91*Ye,.57*qe),D.lineTo(.89*Ye,.6*qe),D.arc((.9-.02/3)*Ye,.59475*qe,.005*Ye,2*l/3,-l/3),D.stroke(),D.strokeStyle="none",D.fillStyle="rgba(0,0,0,"+t+")",D.fillText("INSTRUCTIONS (Step 2 of 10)",.5*Ye,.05*qe),D.fillText("Cut the four strands at the desired length for your bracelet.",.5*Ye,.66*qe),D.fillText("Small: 105 cm / 42 inches",.5*Ye,.7*qe),D.fillText("Large: 120 cm / 48 inches",.5*Ye,.74*qe)}}break;case 2:let h=d(c(1,e/2));1==h&&(Ge+=1,t=dr);let u=.01*(1-h)+.005*h;for(let e=0;e<4;++e){let t=[],r=(.1*(2*((e+1)/5)-1)+.05)*(1-h)+.2*a(e/4*n+.125*l)*h;t.push(-.8-.1*h,r,0,e),t.push(.8+.1*h,r,0,e),at(t,u),t=[]}break;case 3:{let t=d(c(1,e/8)),s=(f(t,.25),f(t,2.5)),h=.005*(1-t)+.003*t;for(let e=0;e<4;++e){let f=[],s=e/4*n;for(let h=0;h<3*r;++h){let u=h/(3*r),c=t,b=u*(1.8*(1-t)+1.6*t)-.9,d=a(u*n*i*c+s+.125*l)*(.2*(1-t)+.01*t),p=.01*o(u*n*i*c+s+.125*l)*t;f.push(b,d,p,e)}at(f,h,!0)}let u=.85*Ye+.05*qe*a(.05*n),b=.5*qe+.05*qe*o(.05*n);D.strokeStyle="rgba(0,0,0,"+s+")",D.lineWidth=Ke,D.beginPath(),D.arc(.85*Ye,.5*qe,.05*qe,.05*n,.95*n,!1),D.moveTo(u-.01*qe,b),D.lineTo(u,b),D.lineTo(u+.005*qe,b+.01*qe),D.stroke(),D.strokeStyle="none",D.fillStyle="rgba(0,0,0,"+t+")",D.fillText("INSTRUCTIONS (Step 3 of 10)",.5*Ye,.05*qe),Fr(["","Secure one end of the bracelet, either by taping it","to a hard surface or by having a friend hold one end.","Twist the other end until the entire length is","twisted very tightly (until it starts to kink)."])}break;case 4:{let t=d(c(1,e/3)),r=.003,f=t*l*.99,s=t*l*.01;for(let e=0;e<4;++e){let t=[],h=e/4*n+.125*l;for(let r=0;r<300;++r){let l=r/600,f=1.6*l-.9-.1,u=.01*a(l*n*i+h),c=f*a(s)+u*o(s)+.1,b=-f*o(s)+u*a(s),d=.01*o(l*n*i+h);t.push(c,b,d,e)}for(let r=0;r<300;++r){let l=(r+300)/600,s=1.6*l-.9+.1,u=.01*a(l*n*i+h),c=s*a(f)+u*o(f)-.1,b=-s*o(f)+u*a(f),d=.01*o(l*n*i+h);t.push(c,b,d,e)}at(t,r,!0)}_r(.445*Ye,.4*qe-.02*(1-t)*qe,.015*Ye,.015*qe),D.strokeStyle="none",D.fillStyle="rgba(0,0,0,"+t+")",D.fillText("INSTRUCTIONS (Step 4 of 10)",.5*Ye,.05*qe),Fr(["Place a finger in the middle. Fold in half over","your finger, bringing the two ends together while","maintaining tension in the bracelet."])}break;case 5:{d(c(1,e/3));let r=c(1,e/4),f=d(r),s=b(0,c(1,(e-4)/2));1==f&&(f+=s*y.n3(.654,.654,4*e)*.02),1==s&&(Ge+=1,t=dr);let h=.003,u=.99*l,p=.01*l;for(let e=0;e<4;++e){let t=[],r=e/4*n+.125*l;for(let l=0;l<300;++l){let s=l/600,h=1.6*s-.9-.1,u=.01*a(s*n*i+r),c=h*a(p)+u*o(p)+.1,b=-h*o(p)+u*a(p);b*=a(s*n*2*f);let d=.01*o(s*n*i+r);t.push(c,b,d,e)}for(let l=0;l<300;++l){let s=(l+300)/600,h=1.6*s-.9+.1,c=.01*a(s*n*i+r),b=h*a(u)+c*o(u)-.1,d=-h*o(u)+c*a(u);d*=a((1-s)*n*2*f);let p=.01*o(s*n*i+r);t.push(b,d,p,e)}at(t,h,!0)}let v=.05*n*f+.95*(1-f)*n,g=.45*Ye+.05*qe*a(v),T=.5*qe+.05*qe*o(v),m=a(v+1*l/4+l/2),x=o(v+1*l/4+l/2),A=a(v-1*l/4+l/2),k=o(v-1*l/4+l/2);D.strokeStyle="rgba(0,0,0,1)",D.lineWidth=Ke,D.beginPath(),D.arc(.45*Ye,.5*qe,.05*qe,v,.95*n,!1),D.moveTo(g+.01*m*Ye,T+.01*x*qe),D.lineTo(g,T),D.lineTo(g+.01*A*Ye,T+.01*k*qe),D.stroke(),D.strokeStyle="none",D.fillStyle="rgba(0,0,0,1.0)",D.fillText("INSTRUCTIONS (Step 5 of 10)",.5*Ye,.05*qe),Fr(["While holding the two end pieces in one hand,","release the center so that the bracelet can","spring into shape. You may need to hold it","upright and smooth it to remove any kinks."])}break;case 6:{let t=d(c(1,b(0,(e-2)/3))),r=d(c(1,e/.5)),s=.003,h=5,u=.01*(1+t),p=.02*(1+.5*t);for(let e=0;e<2;++e){let c=e*l;for(let e=0;e<4;++e){let l=[],b=e/4*n;for(let r=0;r<600;++r){let s=r/600,d=s*(.8*(1-t)+1.8*t)-.9,v=f((1-s)*s*4,.2)*(a(s*n*i+b)*u+a(s*n*h+c)*p),g=o(s*n*i+b)*u+o(s*n*h+c)*p;l.push(d,v,g,e)}at(l,s,!0,r)}}D.strokeStyle="none",D.fillStyle="rgba(0,0,0,1.0)",D.fillText("INSTRUCTIONS (Step 5 of 10)",.5*Ye,.05*qe),Fr(["While holding the two end pieces in one hand,","release the center so that the bracelet can","spring into shape. You may need to hold it","upright and smooth it to remove any kinks."])}break;case 7:{let t=d(c(1,e/3)),r=c(1,e/4),s=d(r),h=.003,u=5,b=.02,p=.03;for(let e=0;e<2;++e){let t=e*l;for(let e=0;e<4;++e){let r=[],l=e/4*n;for(let h=0;h<600;++h){let c=h/600,d=1.8*c-.9,v=f((1-c)*c*4,.2)*(a(c*n*i+l)*b+a(c*n*u+t)*p)*a(c*n*6*s),g=o(c*n*i+l)*b+o(c*n*u+t)*p;r.push(d,v,g,e)}at(r,h,!0)}}D.strokeStyle="none",D.fillStyle="rgba(0,0,0,"+t+")",D.fillText("INSTRUCTIONS (Step 6 of 10)",.5*Ye,.05*qe),Fr(["While holding the two end pieces in one hand,","use your other hand to twist the bracelet","in the opposite direction.","","Twist until the entire length is twisted","very tightly (until it starts to kink)."])}break;case 8:{let t=d(c(1,e/3)),r=.003,s=5,h=.02*(1-.5*t),u=.03*(1-t/3),b=t*l*.99,p=t*l*.01;for(let e=0;e<2;++e){let t=e*l;for(let e=0;e<4;++e){let l=[],c=e/4*n;for(let r=0;r<300;++r){let b=r/600,d=1.8*b-.9,v=f((1-b)*b*4,.2)*(a(b*n*i+c)*h+a(b*n*s+t)*u);v*=a(b*n*6);let g=d*a(p)+v*o(p),T=-d*o(p)+v*a(p),y=o(b*n*i+c)*h+o(b*n*s+t)*u;l.push(g,T,y,e)}for(let r=0;r<300;++r){let d=(r+300)/600,p=1.8*d-.9,v=f((1-d)*d*4,.2)*(a(d*n*i+c)*h+a(d*n*s+t)*u);v*=a(d*n*6);let g=p*a(b)+v*o(b),T=-p*o(b)+v*a(b),y=o(d*n*i+c)*h+o(d*n*s+t)*u;l.push(g,T,y,e)}at(l,r,!0)}}_r(.495*Ye,.4*qe-.02*(1-t)*qe,.015*Ye,.015*qe),D.strokeStyle="none",D.fillStyle="rgba(0,0,0,"+t+")",D.fillText("INSTRUCTIONS (Step 7 of 10)",.5*Ye,.05*qe),Fr(["Place a finger in the middle. Fold in half over","your finger, bringing the two ends together while","maintaining tension in the bracelet."])}break;case 9:{d(c(1,e/3));let r=c(1,e/4),s=d(r),h=b(0,c(1,(e-4)/2));1==s&&(s+=h*y.n3(.654,.654,4*e)*.02),1==h&&(Ge+=1,t=dr);let u=.003,p=5,v=.01,g=.02,T=.99*l,m=.01*l;for(let e=0;e<2;++e){let t=e*l;for(let e=0;e<4;++e){let r=[],l=e/4*n;for(let h=0;h<300;++h){let u=h/600,c=1.8*u-.9,b=f((1-u)*u*4,.2)*(a(u*n*i+l)*v+a(u*n*p+t)*g);b*=a(u*n*6);let d=c*a(m)+b*o(m),T=-c*o(m)+b*a(m);T*=a(u*n*2*s);let y=o(u*n*i+l)*v+o(u*n*p+t)*g;r.push(d,T,y,e)}for(let h=0;h<300;++h){let u=(h+300)/600,c=1.8*u-.9,b=f((1-u)*u*4,.2)*(a(u*n*i+l)*v+a(u*n*p+t)*g);b*=a(u*n*6);let d=c*a(T)+b*o(T),y=-c*o(T)+b*a(T);y*=a((1-u)*n*2*s);let m=o(u*n*i+l)*v+o(u*n*p+t)*g;r.push(d,y,m,e)}at(r,u,!0)}}let x=.05*n*s+.95*(1-s)*n,A=.5*Ye+.05*qe*a(x),k=.5*qe+.05*qe*o(x),S=a(x+1*l/4+l/2),E=o(x+1*l/4+l/2),P=a(x-1*l/4+l/2),w=o(x-1*l/4+l/2);D.strokeStyle="rgba(0,0,0,1)",D.lineWidth=Ke,D.beginPath(),D.arc(.5*Ye,.5*qe,.05*qe,x,.95*n,!1),D.moveTo(A+.01*S*Ye,k+.01*E*qe),D.lineTo(A,k),D.lineTo(A+.01*P*Ye,k+.01*w*qe),D.stroke(),D.strokeStyle="none",D.fillStyle="rgba(0,0,0,1.0)",D.fillText("INSTRUCTIONS (Step 8 of 10)",.5*Ye,.05*qe),Fr(["While holding the two end pieces in one hand,","release the center so that the bracelet can","spring into shape. You may need to hold it","upright and smooth it to remove any kinks."])}break;case 10:{let t=d(c(1,b(0,(e-2)/3))),r=d(c(1,e/.5)),s=.0015,h=3,u=.015*(1+t),p=.03*(1+.5*t);for(let e=0;e<4;++e){let c=e*l*.5;for(let e=0;e<4;++e){let l=[],b=e/4*n;for(let r=0;r<600;++r){let s=r/600,d=s*(.8*(1-t)+1.8*t)-.9,v=f((1-s)*s*4,.2)*(a(s*n*i+b)*u+a(s*n*h+c)*p),g=o(s*n*i+b)*u+o(s*n*h+c)*p;l.push(d,v,g,e)}at(l,s,!0,r)}}D.strokeStyle="none",D.fillStyle="rgba(0,0,0,1.0)",D.fillText("INSTRUCTIONS (Step 8 of 10)",.5*Ye,.05*qe),Fr(["While holding the two end pieces in one hand,","release the center so that the bracelet can","spring into shape. You may need to hold it","upright and smooth it to remove any kinks."])}break;case 11:if(d(c(1,e/2)),e>2){let t=d(c(1,(e-2)/2)),i=d(c(1,b(0,(e-4)/2))),l=.8-.5*i,n=200-300*t;for(let e=0;e<8;++e){let t=[],a=.05*((e+1)/9*2-1);for(let o=n;o<r+1;++o){let n=o/r*4-2,s=f(n,3)-3*n,h=f(n,4)-4*n*n+2,u=.2*f(n,5)-2*n,c=o/r*5-2,b=0,d=0,p=f(o/r,10),v=f(o/r,2);s=s*(1-p)+c*p,h=h*(1-v)+b*v,u=u*(1-p)+d*p,t.push(.1*s*l-.8*(1-i)-.67*i,.05*-h*l+a*l,.1*u,e%4)}at(t,.005,!1)}}{let t=d(c(1,b(0,e/2))),r=(d(c(1,e/.5)),.0015),s=3,h=.03,u=.045;for(let e=0;e<4;++e){let c=e*l*.5;for(let e=0;e<4;++e){let l=[],b=e/4*n;for(let r=0;r<600;++r){let d=r/600,p=-.9*(1-t)-.6*t+d*(1.8*(1-t)+1.4*t),v=f((1-d)*d*4,.2)*(a(d*n*i+b)*h+a(d*n*s+c)*u),g=o(d*n*i+b)*h+o(d*n*s+c)*u;l.push(p,v,g,e)}at(l,r,!0)}}}D.strokeStyle="none",D.fillStyle="rgba(0,0,0,1.0)",D.fillText("INSTRUCTIONS (Step 9 of 10)",.5*Ye,.05*qe),Fr(["Tie a double knot in the cut end."]);break;case 12:{d(c(1,e/2));let t=.3,i=-100;for(let e=0;e<8;++e){let l=[],n=.05*((e+1)/9*2-1);for(let a=i;a<r+1;++a){let i=a/r*4-2,o=f(i,3)-3*i,s=f(i,4)-4*i*i+2,h=.2*f(i,5)-2*i,u=a/r*5-2,c=0,b=0,d=f(a/r,10),p=f(a/r,2);o=o*(1-d)+u*d,s=s*(1-p)+c*p,h=h*(1-d)+b*d,l.push(.1*o*t-.67,.05*-s*t+n*t,.1*h,e%4)}at(l,.005,!1)}}{let t=d(c(1,b(0,e/2))),r=(d(c(1,e/.5)),.0015),h=3,u=.03,p=.045;for(let e=0;e<4;++e){let t=e*l*.5;for(let e=0;e<4;++e){let l=[],s=e/4*n;for(let r=0;r<600;++r){let c=r/600,b=1.4*c-.6,d=f((1-c)*c*4,.2)*(a(c*n*i+s)*u+a(c*n*h+t)*p),v=o(c*n*i+s)*u+o(c*n*h+t)*p;l.push(b,d,v,e)}at(l,r,!0)}}D.strokeStyle="rgba(0,0,0,1)",D.lineWidth=Ke,D.beginPath(),D.arc(.52*Ye,.5*qe,.35*qe,-.97*l,-.05*l,!1);let v=.52*Ye+.35*qe*a(-.05*l),g=.5*qe+.35*qe*o(-.05*l);D.moveTo(v-.02*Ye,g-.02*qe),D.lineTo(v,g),D.lineTo(v+.013*Ye,g-.022*qe),D.stroke(),D.beginPath(),D.arc(.5*Ye,.3*qe,.12*qe,0,n),D.stroke(),D.beginPath(),D.arc(.45*Ye,.32*qe,.13*qe,.45*-l,.05*-l),D.stroke(),v=.45*Ye+.13*qe*a(-.05*l),g=.32*qe+.13*qe*o(-.05*l),D.beginPath(),D.moveTo(v-.015*Ye,g-.015*qe),D.lineTo(v,g),D.lineTo(v+.008*Ye,g-.018*qe),D.stroke();let T=25;for(let e=0;e<4;++e){let t=[],i=e/4*n;for(let r=0;r<600;++r){let f=r/600,h=(r+1)/600,u=o(l*f)-.5,c=a(3*l*f)*f*(1-f),b=o(l*h)-.5-u,d=a(3*l*h)*h*(1-h)-c,v=s(b*b+d*d),g=f*n*T,y=a(g+i)*p*.5;u+=-d/v*y,c+=b/v*y;let m=o(g+i)*p*.5;t.push(.45*u-.01,.45*c+.4,m,e)}at(t,r,!0)}D.strokeStyle="none",D.fillStyle="rgba(0,0,0,"+t+")",D.fillText("INSTRUCTIONS (Step 10 of 10)",.5*Ye,.05*qe),Fr(["Create a small loop in the unknotted end","by pushing your finger through.","Wrap the bracelet around your wrist.","","Push the knotted end through the small loop you created.","Adjust the tightness of the bracelet as desired."])}}}ur=i(Z),br=i(Q),cr=i($),E.clear(E.DEPTH_BUFFER_BIT),E.enable(E.DEPTH_TEST),E.useProgram(gt),E.bindBuffer(I,Xt),E.bufferData(I,nr,M),E.enableVertexAttribArray(At),E.vertexAttribPointer(At,4,R,!1,0,0),E.bindBuffer(I,jt),E.bufferData(I,br,M),E.enableVertexAttribArray(kt),E.vertexAttribPointer(kt,4,R,!1,0,0),P.vertexAttribDivisorANGLE(kt,1),E.bindBuffer(I,Jt),E.bufferData(I,ur,M),E.enableVertexAttribArray(St),E.vertexAttribPointer(St,4,R,!1,0,0),P.vertexAttribDivisorANGLE(St,1),E.bindBuffer(I,Kt),E.bufferData(I,cr,M),E.enableVertexAttribArray(Dt),E.vertexAttribPointer(Dt,1,R,!1,0,0),P.vertexAttribDivisorANGLE(Dt,1),E.uniform4fv(Pt,He),E.uniform2f(Et,et/$e,tt/$e),P.drawArraysInstancedANGLE(w,0,lr,hr),P.vertexAttribDivisorANGLE(kt,0),P.vertexAttribDivisorANGLE(St,0),P.vertexAttribDivisorANGLE(Dt,0),E.bindFramebuffer(B,null),E.viewport(0,0,E.canvas.width,E.canvas.height),E.useProgram(xt),E.bindTexture(C,Y),E.enableVertexAttribArray(Yt),E.bindBuffer(I,ar),E.vertexAttribPointer(Yt,2,R,!1,0,0),E.enableVertexAttribArray(qt),E.bindBuffer(I,sr),E.vertexAttribPointer(qt,2,R,!1,0,0),E.disable(E.BLEND),E.drawArrays(w,0,6),E.enable(E.BLEND)}document.body.style.backgroundColor="#000",window.requestAnimationFrame(Ir)}})();