View source
Full Source Code - Only 1024 Bytes
A=window;D=Math;E=D.floor;F=D.sin;G=D.cos;H=D.abs;I=document;C=I.getElementById("c");C.height=P=A.innerHeight;C.width=Q=A.innerWidth;I.onmousemove=function(e){q=e.pageX-Q/2};C=C.getContext("2d");C.B=C.lineTo;d=33;c=[];for(i=8;i--;)c[i]=[E((i+1)/2%2),E(i/4),E(i/2%2)];function R(p,x,r){y=(x+1)%3;z=(x+2)%3;n=[];n[x]=p[x]*G(r)-p[z]*F(r);n[y]=p[y];n[z]=p[z]*G(r)+p[x]*F(r);return n}q=a=g=o=.2;t=[[0,0,0,1,1],[0,0,-15,5,1],[0,0,15,5,1],[-12,-1,-16,25,d]];setInterval(function(){C.clearRect(0,0,Q,P);a+=.01;for(h in t){u=[];v=t[h];if(h<1){J=v[0]+=g;K=v[2]+=o;if(H(J)>12)g=-g;if(H(K)>16)v[0]=v[2]=0}else if(h<3){v[0]=X=D.max(D.min(q/20*(h*2-3)-2,8),-12);if(K+1>v[2]&&KX&&J2)];m=u[i+4];C.moveTo(j[0],j[1]);C.B(k[0],k[1]);C.B(l[0],l[1]);C.B(m[0],m[1]);C.strokeStyle=\'#A13\'}C.stroke()}},d)//PINGPONG

Run Demo