-
Notifications
You must be signed in to change notification settings - Fork 54
/
a.htm
1 lines (1 loc) · 3.82 KB
/
a.htm
1
<body style=margin:0 onload="P=1e5;t=(t,i=0,n=0,e=1)=>`hsl(${n+m},${i}%,${t}%,${e})`;i=(t,i)=>t<i?t:i;n=(t,i)=>t>i?t:i;e=(t,e,h=0)=>e+i(n(t,0),1)*(h-e);h=t=>(t+Math.PI)%(2*Math.PI)+(0>t+Math.PI?Math.PI:-Math.PI);o=(t=1,i=0)=>e(1e5*(Math.sin(++b)+1)%1,i,t);function a(t=0,i=0,n=0){this.x=t,this.y=i,this.z=n}d=(t,i)=>new a(t.x+(i<P?i:i.x),t.y+(i<P?i:i.y),t.z+(i<P?i:i.z));w=(t,i)=>new a(t.x*(i<P?i:i.x),t.y*(i<P?i:i.y),t.z*(i<P?i:i.z));z=(t,i,n,e,h,o,a)=>B.beginPath(B.fillStyle=a,B.lineTo(t-n|0,0|i),B.lineTo(t+n|0,0|i),B.lineTo(e+o|0,0|h),B.lineTo(e-o|0,0|h),B.fill());for(onmousedown=N=>_?r=1:_=1,onmouseup=N=>r=0,onmousemove=N=>O=N.x/c.width*2-1,x=new a(s=L=u=m=r=N=R=O=f=_=0),p=v=b=Date.now(g=[]),F=500;P>N;g[N].o=.2>o()&N++>99?o(1e4,-1e4)*o(9):0)++L>R&&(F=500*o(1-.7*(k=i(1,N/9e3)),3-2*k),B=o(e(k,L=.01,.02)),E=o(e(k,.01,.03)),J=N>1e4?0:o(e(k,.2,.6)),K=o(e(k,1e3,2e3)),l=R=(j=0|o(99,500))+o(99,500),N-=j),I=Math.sin(N*B)*J,S=Math.sin(N*E)*K,W=i(n(L/j,0),1),g[N]=g[N]?g[N]:{x:I,y:S,a:F},g[N].x=e(W,g[N].x,I),g[N].y=e(W,g[N].y,S),g[N].z=100*N,g[N].a=N>1e4?0:e(W,g[N].a,F),g[N].b=g[N-1]?Math.atan2(g[N-1].y-g[N].y,99):0;y=new a(g[0].x,g[0].y+150),requestAnimationFrame(k=N=>{c.width=window.innerWidth,c.height=window.innerHeight,V=e(U=y.z/100%1,g[Q=0|y.z/100].x,g[Q+1].x),X=e(U,g[Q].y,g[Q+1].y)+150,Y=e(U,g[Q].b,g[Q+1].b),Z=d(x,0),x.y--,x.x*=.7,x.z=p?n(0,.999*x.z):0,y=d(y,x),T=O*e(x.z/300,.2),x.x+=T*x.z-.002*x.z*x.z*V,y.x=i(n(y.x,-2e3),2e3),y.y<X&&(y.y=X,x=d(w(new a(J=0,Math.cos(Y),Math.sin(Y)),-1.2*(Math.cos(Y)*x.y+Math.sin(Y)*x.z)),x),x.z+=r?-3:e(x.z/300,_),Math.abs(y.x)>g[Q].a&&(x.z*=.98,s+=Math.sin(y.z/99)**4/99)),J++<6&&K&&K<9&&p*r?x.y+=K=25:K=r?0:K+1,G=(y.y-X)/99,u+=e(G,0,x.y/4e4),u+=(x.z-Z.z)/2e3,u-=.01*s,s+=u*=.9,f=e(.1,f,e(G,-Y)),M=s+f,L=w(new a(1,-1,1),c.width/2),b=v,l=h(l+x.z*V*5e-5),$=2*T,W=Math.sin($)/2,j=Math.cos(l),R=c.height/2-Math.tan(M)*L.y,(A=B.createLinearGradient(0,R-c.height/2,0,R)).addColorStop(0,t(39+25*j,49+19*j,230-19*j)),A.addColorStop(1,t(5,79,250-9*j)),z(c.width/2,0,c.width/2,c.width/2,c.height,c.width/2,A);for(N=2;N--;z(c.width/2,0,c.width/2,c.width/2,c.height,c.width/2,A))A=B.createRadialGradient(I=c.width*(.5+e((l/Math.PI/2+.5+N/2)%1,4,-4)-W),S=R-c.width/5,c.width/25,I,S,N?c.width/23:c.width),A.addColorStop(0,t(N?70:99)),A.addColorStop(1,t(0,0,0,0));for(N=30;N--;)G=h(l+o(19)),j=Math.cos(G-l),z(I=c.width*(.5+e(G/Math.PI/2+.5,4,-4)-W),S=R,F=o(.2,.8)**2*c.width/2,I+F*o(-.5,.5),S-o(.5,.8)*F,0,t(o(15,25)+N/3-9*j,N/2+o(19),o(220,230)));for(z(c.width/2,R,c.width/2,c.width/2,c.height,c.width/2,t(25,30,95)),I=F=N=0;801>N;)W=d(new a(I+=F+=g[Q+N].x,g[Q+N].y,g[Q+N].z),w(y,-1)),W.x=W.x*Math.cos($)-W.z*Math.sin($),C=1/(W.z*Math.cos(M)-W.y*Math.sin(M)),W.y=W.y*Math.cos(M)-W.z*Math.sin(M),W.z=C,g[Q+N++].p=d(w(w(W,new a(C,C,1)),L),new a(c.width/2,c.height/2));for(N=800,E=g[Q+N];N--;)L=g[Q+N],b=v+Q+N,j=Math.sin(L.b)*Math.cos(l)*99,q=L.p,D=E.p,0<q.z&P>q.z&&(0==N%(0|e(N/800,1,9))&&(z(c.width/2,q.y,c.width/2,c.width/2,D.y,c.width/2,t(25+j,30,95)),400<L.a&&z(q.x,q.y,q.z*(L.a+150),D.x,D.y,D.z*(E.a+150),t((9>(N+Q)%19?50:20)+j)),z(q.x,q.y,q.z*L.a,D.x,D.y,D.z*E.a,t((300>L.z%P?70:7)+j)),300<L.a&&0==(N+Q)%9&N<266&&z(q.x,q.y,9*q.z,D.x,D.y,9*D.z,t(70+j)),E=L),L.o&&(C=(o(2)|0)*400,!L.h&200>Math.abs(y.x-L.o)&200>Math.abs(y.z+99-L.z)&y.y<L.y+350+C&&(x=w(x,L.h=.1)),G=e(N/800,4),C?(z(I=q.x+q.z*L.o,q.y,29*q.z,I,q.y-99*q.z,29*q.z,t(o(9)+5,50+o(9),29+o(9),G)),z(I,q.y-o(50,99)*q.z,q.z*o(199,250),I,q.y-o(600,800)*q.z,0,t(o(9)+25,80+o(9),o(29),G))):z(I=q.x+q.z*L.o,q.y,q.z*o(200,250),I+q.z*o(99,-99),q.y-o(200,250)*q.z,q.z*o(99),t(o(19)+50,25+o(19),209+o(9),G))));y.z>P&&(p+=10,P+=1e5,m+=36),B.font=`9em impact`,N=(t,i)=>(B.fillText(t,i,129),B.strokeText(t,i,129)),B.fillStyle=t(99,0,0,.5),_?N(0|y.z/1e3,c.width-9,N(Math.ceil(p=i(n(p-1/60,0),20)),9),B.textAlign=`right`):N('HUE JUMPER',c.width/2,B.textAlign=`center`),requestAnimationFrame(k)});(B=c.getContext`2d`)"><canvas id=c>