-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
2 lines (2 loc) · 30.9 KB
/
index.html
1
2
<html><head><style>body{margin:0;overflow:hidden}.a{fill:#09d;stroke:#fff;stroke-dasharray:7% 28%;stroke-width:3px;animation:c 9s infinite ease-in}.a:nth-child(1){stroke:#ff9800;stroke-dashoffset:7%}.a:nth-child(2){stroke:#ff0;stroke-dashoffset:14%}.a:nth-child(3){stroke:#8f8;stroke-dashoffset:21%}.a:nth-child(4){stroke:#fff;stroke-dashoffset:28%}.a:nth-child(5){stroke:transparent;stroke-dashoffset:35%}.d{font:6vw Arial;font-weight:bolder}@keyframes c{50%{stroke-dashoffset:35%;stroke-dasharray:0 87.5%}}.b{letter-spacing:-7px;font-weight:700;animation:e 1s ease-out;opacity:0;position:absolute;left:0;width:90%;text-shadow:0 0 5px #fff,0 0 7px #fff;text-align:right;color:#fff;top:20%;font-size:6em}.l{letter-spacing:-7px;font-weight:700;animation:e 1s ease-out;opacity:0;position:absolute;left:0;text-shadow:0 0 5px #000,0 0 7px #000;text-align:left;color:#000;bottom:20%;font-size:4vw}@keyframes e{from{opacity:1;text-shadow:0 0 10px #fff,0 0 10px #fff,0 0 25px #fff,0 0 25px #fff,0 0 25px #fff,0 0 25px #fff,0 0 25px #fff,0 0 25px #fff,0 0 50px #fff,0 0 50px #fff,0 0 50px #7B96B8,0 0 150px #7B96B8,0 10px 100px #7B96B8,0 10px 100px #7B96B8,0 10px 100px #7B96B8,0 10px 100px #7B96B8,0 -10px 100px #7B96B8,0 -10px 100px #7B96B8}}@keyframes f{from{opacity:1;text-shadow:0 0 2px #fff,0 0 2px #fff,0 0 5px #fff,0 0 5px #fff,0 0 5px #fff,0 0 5px #fff,0 0 5px #fff,0 0 5px #fff,0 0 10px #fff,0 0 10px #fff,0 0 10px rgba(255,255,255,0.75),0 0 30px rgba(255,255,255,0.75),0 2px 20px rgba(255,255,255,0.75),0 2px 20px rgba(255,255,255,0.75),0 2px 20px rgba(255,255,255,0.75),0 2px 20px rgba(255,255,255,0.75),0 -2px 20px rgba(255,255,255,0.75),0 -2px 20px rgba(255,255,255,0.75)}}.g{color:#fff;font:3vw Helvetica;letter-spacing:.2em;font-weight:700;text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9}.h{font:4vw "Avant Garde",Avantgarde,"Century Gothic",CenturyGothic,AppleGothic,sans-serif;font-weight:bolder;text-rendering:optimizeLegibility;color:#ff9800;letter-spacing:.15em;animation:f 1s linear alternate infinite}.i{border-radius:4vw;box-shadow:0 0 1vw #fff;padding:2vw;margin:auto;cursor:pointer;text-align:center;left:0;right:0;position:absolute;width:20%;bottom:2%}.j{width:5vw;height:5vw;border-radius:2.5vw;margin:5% .5%;margin-top:100%;display:inline-block;vertical-align:top;box-shadow:0 0 2vw #000;transition:margin-top 1s,width 1s,height 1s}.k{display:none;position:absolute}@media (min-width: 800px){.d{font-size:2vw}.g{text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15)}#w{top:-100px}}</style></head><body onload="setTimeout(f,500)" onresize="s()"><canvas id="c"></canvas><div id="0" style="background:#0bf;margin:0;width:100%;height:100%;transition:opacity 1s;position:absolute;top:0;overflow:hidden;display:none"><div id='v' class='g' style="width:100%;margin-top:1%;text-align:center;">LEVEL <span id="!"></span><br/><br/>remember this sequence:<br/></div><div id="1" class="i" style="display:none"><div class="h">OK</div></div></div><div id="5" style="background:#0bf;margin:0;width:100%;height:100%;transition:opacity 1s;position:absolute;top:0;display:none"><div id='r' class='g' style="width:100%;margin-top:1%;text-align:center;">GAME OVER<br/><br/>score: <span id="p"></span><br/><span id="o"></span></div><div id='q' class="h" style="text-align:center">BEST SCORE</div><div id='6' class="i"><div class="h">Retry</div></div></div><div id="$" style="background:#0bf;margin:0;width:100%;height:100%;transition:opacity 1s;position:absolute;top:0"><div id='s' class='h' style='position:absolute;bottom:10%;left:10%'>Loading</div><div id="2" style="position:absolute;top:20%;width:100%"><svg id="w" viewBox="0 0 400 60" style="position:relative;width:100%;top:0"><symbol id="y"><text x="10%" y="35" class="d" id=":">R3V3RS3 IT!</text></symbol><g id="3"><use xlink:href="#y" class="a"></use><use xlink:href="#y" class="a"></use><use xlink:href="#y" class="a"></use><use xlink:href="#y" class="a"></use><use xlink:href="#y" class="a"></use></g></svg><div id='t' class='g' style="position:relative;text-align:right;margin-left:30%">a web game in 10kb by GIO</div></div></div><div id="_" style="position:absolute;width:100%;height:100%;top:0;display:none"><svg viewBox="0 0 400 20" version="1.1" style="width:100%"><radialGradient id="g0"><stop offset="0%" stop-color="#000" /><stop offset="100%" stop-color="#002" /></radialGradient><radialGradient id="g1"><stop offset="0%" stop-color="#224" /><stop offset="50%" stop-color="#aaf" /><stop offset="100%" stop-color="#224" /></radialGradient><linearGradient id="g3"><stop offset="0%" stop-color="#224" /><stop offset="100%" stop-color="#aaf" /></linearGradient><linearGradient id="g4"><stop offset="0%" stop-color="#aaf" /><stop offset="100%" stop-color="#224" /></linearGradient><path d="M 200 20 Q 300 0 400 10 L 400 -2 L 200 -2 Z" stroke="url(#g1)" fill="url(#g3)" stroke-width="0.5"/><path d="M 200 20 Q 100 0 0 10 L 0 -2 L 200 -2 Z" stroke="url(#g1)" fill="url(#g4)" stroke-width="0.5"/><circle cx="200" cy="10" r="9" stroke="url(#g1)" fill="url(#g0)" stroke-width="2"/></svg><svg viewBox="0 0 400 20" version="1.1" style="width:100%;position:absolute;bottom:0;left:0"><radialGradient id="g0"><stop offset="0%" stop-color="#000" /><stop offset="100%" stop-color="#002" /></radialGradient><radialGradient id="g1"><stop offset="0%" stop-color="#224" /><stop offset="50%" stop-color="#aaf" /><stop offset="100%" stop-color="#224" /></radialGradient><linearGradient id="g3"><stop offset="0%" stop-color="#224" /><stop offset="100%" stop-color="#aaf" /></linearGradient><linearGradient id="g4"><stop offset="0%" stop-color="#aaf" /><stop offset="100%" stop-color="#224" /></linearGradient><path d="M 200 0 Q 300 20 400 10 L 400 22 L 200 22 Z" stroke="url(#g1)" fill="url(#g3)" stroke-width="0.5"/><path d="M 200 0 Q 100 20 0 10 L 0 22 L 200 22 Z" stroke="url(#g1)" fill="url(#g4)" stroke-width="0.5"/><ellipse cx="200" cy="10" rx="27" ry="9" stroke="url(#g1)" fill="url(#g0)" stroke-width="2"/></svg><svg id="9" viewBox="0 0 400 20" version="1.1" style="width:100%;position:absolute;bottom:0;left:0;transition:opacity 0.3s;opacity:0"><radialGradient id="g5"><stop offset="0%" stop-color="#0ff" /><stop offset="100%" stop-color="#8ff" /></radialGradient><ellipse cx="200" cy="10" rx="27" ry="9" stroke="transparent" fill="url(#g5)" stroke-width="2"/></svg><div id="." style="font:2.5vw 'Lucida Console',Monaco,monospace;color:#fff;text-align:center;position:absolute;top:1.45vw;width:100%"></div><div id="," style="font:2.5vw 'Lucida Console',Monaco,monospace;color: #006687;text-align:center;position:absolute;bottom:1.2vw;width:100%;text-shadow:0 0 0.2vw black"></div></div><div id="%" class="b"></div><div id="+" class="l"></div><div style="display:none"><div id="a">attribute vec4 v;attribute vec3 n;uniform mat4 A,B;varying vec4 G,H;varying vec3 I,J,L;void main(){gl_Position=H=A*vec4(v.xyz,1.);G=vec4(n,v.y);J=v.xyz;L=(B*vec4(-v.xyz,1.)).xyz;I=vec3(fract(v.w)*1.001,floor(v.w)/10000.,B[1].y);}</div><div id="b">#extension GL_OES_standard_derivatives : enable
precision mediump float;varying vec4 G,H;varying vec3 I,J,L;uniform sampler2D s0,s1,s2,s3,s4;uniform vec4 C;void main(){vec3 a=vec3(0.1,0.05,0.);vec3 b=vec3(0.41,-0.82,0.41);vec3 c=texture2D(s0,I.xy*37.).xyz;vec3 d=texture2D(s1,I.xy*49.).xyz;vec3 e=texture2D(s2,I.xy*51.).xyz;vec4 f=texture2D(s3,I.xy*40.);vec2 g=fract(I.xy*0.5+C.y/1000.);vec4 h=texture2D(s3,g)*smoothstep(0.,0.03,g.x)*smoothstep(0.,0.03,1.-g.x)*smoothstep(0.,0.03,g.y)*smoothstep(0.,0.03,1.-g.y);float i=pow(G.y,8.);vec3 j=mix(e,d,i);float k=clamp((G.w-3.-f.x)/3.,0.,1.);j=mix(c,j,k)*(1.-h.x/2.);vec3 l=G.xyz;~highp float m=max(0.,-dot(b,l));vec3 n=normalize(-b+normalize(L));float o=max(0.,pow(dot(n,l),4.)*(1.-i*0.9)*(1.-k*0.9));vec3 p=m*j+a+o*length(j.xyz)*vec3(0.9,0.8,0.6);gl_FragColor=vec4(p,1.);}</div><div id="e">attribute vec4 v;uniform mat4 A,B;uniform vec4 C;varying vec4 I;void main(){gl_Position=vec4(v.xy,0.999,1.);float a=atan(B[2].z,B[2].x)/6.282+0.5;I=vec4(fract(v.w)*C.x/8.-a,floor(v.w)/80000.,C.y,a);}</div><div id="f">precision mediump float;varying vec4 I;uniform sampler2D s0;void main(){float a=pow(sin(I.w*3.14),5.);vec3 b=mix(vec3(0.5,0.5,1.),vec3(1.,0.8,0.5),clamp(I.y*10.,0.,1.))+a*vec3(0.8,0.3,0.1);vec2 c=fract(vec2(I.x+I.z*0.001,I.y));vec4 d=texture2D(s0,c);vec3 e=mix(pow(d.xxx,vec3(0.25)),vec3(0.9,0.8,0.6),a)*(1.-pow(d.z,4.));vec4 f=vec4(e,clamp(d.x,0.,1.)*smoothstep(0.,0.03,c.x)*smoothstep(0.,0.03,1.-c.x));c=fract(vec2(I.x+I.z*0.00021+0.5,I.y));d=texture2D(s0,c);e=mix(pow(d.yyy,vec3(0.66,0.66,0.66)),vec3(1.,0.5,0.5),a)*(1.-pow(d.z,4.));vec4 g=vec4(e,clamp(2.*d.y-1.,0.,1.)*smoothstep(0.,0.03,c.x)*smoothstep(0.,0.03,1.-c.x));gl_FragColor=vec4((b*(1.-f.w)+f.xyz*f.w)*(1.-g.w)+g.xyz*g.w,1.);}</div><div id="g">precision mediump float;varying vec4 G,H;varying vec3 I;uniform vec4 C;uniform sampler2D s0,s1,s2,s3;@ void main(){float a=texture2D(s1,fract(clamp(I.xy*3.,1.001,1.999)*vec2(1.,-1.))).x*15.;vec4 b=texture2D(s0,I.xy*54.+sin(C.y*0.1)/25.+sin(C.yy*0.1+I.xy*100.)/10.);b.w=a>1.?0.:pow(clamp((1.-a)*5.,0.,1.),1.7);vec2 c=(H.xy*0.5/H.w+0.5);c.y=1.-c.y;vec2 d;d.x=sin(I.x*1000.+sin(C.y*0.4)+a*20.);d.y=sin(I.y*868.+cos(C.y*0.7)+a*20.);float e=1.-pow(H.z*0.5/H.w+0.5,50.);d*=e;c+=d*0.01;vec4 f=texture2D(s2,c);b=mix(b,f,b.w*clamp(I.z,0.,1.)*0.8*clamp(1.-(C.z-2.5)/12.,0.,1.));vec4 z=texture2D(s3,I.xy*100.+sin(C.yy*0.3+d.yx*0.2)*0.1);float threshold=0.3+z.x*z.y;float specular=smoothstep(threshold-0.1,threshold+0.1,pow(M(I.xy*600.,C.y/5.),5.))*pow(e,0.3)*b.w*0.5;b.rgb+=specular;gl_FragColor=b;}</div><div id="h">attribute vec4 v;varying vec2 I;void main(){I=vec2(fract(v.w)*1.001,floor(v.w)/10000.);gl_Position=vec4(v.xyz,1.);}</div><div id="i">precision mediump float;varying vec2 I;uniform sampler2D s0;uniform vec4 C,D;void main(){vec2 a=I*2.-1.;float b=abs(sin(length(a)*6.28-C.y));float c=min(D.r,min(D.g,D.b));float d=clamp(b+c,0.,1.);vec3 e=texture2D(s0,I+(1.-D.w)*(1.-d)*sin(a)/4.).xyz;vec3 f=mix(e,D.xyz,(1.-d)*0.5);vec3 g=mix(dot(e,vec3(0.299,0.587,0.114))*D.xyz,e,pow(c,4.));gl_FragColor=vec4(mix(f,g,D.w),1.);}</div><div id="j">attribute vec4 v;attribute vec3 n;uniform mat4 B,E;uniform vec4 C;uniform vec4 F[16];varying vec3 I;varying vec4 K;void main(){I=vec3(vec2(fract(v.w)*1.001,floor(v.w)/10000.)*2.-1.,C.y/4.);vec4 a=F[int(v.x)];K=vec4(n.xyz,a.w);gl_Position=E*(B*vec4(a.xyz,1.)+vec4(I.xy*(3.+abs(sin(I.z))),0.,0.));}</div><div id="k">precision mediump float;uniform sampler2D s0;varying vec3 I;varying vec4 K;@ void main(){vec3 c=K.xyz+M(I.xy+I.z,I.z)*mix(K.zxy,vec3(1),abs(sin(I.z)));gl_FragColor=vec4(c,clamp(1.-pow(length(I.xy),2.),0.,1.)*K.w);}</div><div id="l">attribute vec4 v;uniform mat4 A,B;uniform vec4 C;varying vec3 I;void main(){gl_Position=vec4(v.xy,-0.999,1.);I=vec3(v.xy/2.+0.5,C.y/10.);}</div><div id="m">precision mediump float;varying vec3 I;uniform vec4 D;@ void main(){float n=sin(3.14*M(I.xy*8.,I.z));vec3 c=vec3(0.69,0.94,1.);gl_FragColor=vec4(c,n*D.w+pow(D.w,8.));}</div><div id="x">float N(vec2 p){return fract(sin(p.x + p.y*100.)*100.);} float O(vec2 p){vec2 a=smoothstep(0.,1.,fract(p));float s=mix(N(vec2(floor(p.x),floor(p.y))),N(vec2(ceil(p.x),floor(p.y))),a.x);float n=mix(N(vec2(floor(p.x),ceil(p.y))),N(vec2(ceil(p.x),ceil(p.y))),a.x);return mix(s,n,a.y);} float P(vec2 p,float a){float b=0.;b+=O(p-a);b+=O(p*2.+a)/2.;b+=O(p*4.-a)/4.;b+=O(p*8.+a)/8.;b+=O(p*16.-a)/16.;b/=1.9375;return b;} float M(vec2 p, float a){float x=P(p,a);float y=P(p+100.,a);return P(p+vec2(x,y),a);}</div><div id="~">vec4 q=texture2D(s4,I.xy*(50.+200.*k))-0.5;q.xy=mix(q.zw,q.xy,k);vec3 r=dFdx(J);vec3 s=dFdy(J);vec2 t=dFdx(I.xy)*C.w*(1.+4.*k)*C.x;vec2 u=dFdy(I.xy)*C.w*(1.+4.*k);float v=dot(q.xy,t);float w=dot(q.xy,u);vec3 x=cross(s,l);vec3 y=cross(l,r);vec3 z=(x*v+y*w)/dot(r, x);l=normalize(l-z*0.1+(1.-k*0.2));</div></div><script>(function(){var d=document;d.e=d.getElementById;var Q=Float32Array,na=addEventListener,a,A,oa,va,pa,wa,F,X,T,R,xa,U,da,L,V,ya,za,ea,qa,fa,ra,Aa,sa,B,Ba,ga,p=[0,1.2,110],M={},q=[],ba=[],Ga=0,N=0,Y=0,n=[],y=[],C=[],S=new Q([1,1,1,1]),v=0,u=0,h=[1,0,0,0,0,0,1,0,0,-1,0,0,0,-1.2,-150,1],G=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],J=function(a,d,h,n){return a[0]*d+a[1]*h+a[2]*n},ca=function(a){return a*a*a*(a*(6*a-15)+10)},la=function(a,d,h,n){n=n||0;for(var q=[],p=0;256>p;p++)q[p]=Math.floor(256*Math.random());for(var l=[],p=0;512>p;p++)l[p]=q[p&255];this.noise=function(p,q,A){for(var u=Math.pow(d,-n),v=Math.pow(h,n),y=0,F=n;F<a+n;F++)var m=p*v,z=q*v,t=A*v,D=Math.floor(m),e=Math.floor(z),w=Math.floor(t),m=m-D,z=z-e,t=t-w,D=D&255,e=e&255,w=w&255,E=l[D+l[e+l[w+1]]]%12,I=l[D+l[e+1+l[w]]]%12,f=l[D+l[e+1+l[w+1]]]%12,B=l[D+1+l[e+l[w]]]%12,x=l[D+1+l[e+l[w+1]]]%12,b=l[D+1+l[e+1+l[w]]]%12,C=l[D+1+l[e+1+l[w+1]]]%12,D=J(G[l[D+l[e+l[w]]]%12],m,z,t),B=J(G[B],m-1,z,t),I=J(G[I],m,z-1,t),b=J(G[b],m-1,z-1,t),E=J(G[E],m,z,t-1),x=J(G[x],m-1,z,t-1),f=J(G[f],m,z-1,t-1),C=J(G[C],m-1,z-1,t-1),m=ca(m),z=ca(z),t=ca(t),y=y+((1-t)*((1-z)*((1-m)*D+m*B)+z*((1-m)*I+m*b))+t*((1-z)*((1-m)*E+m*x)+z*((1-m)*f+m*C)))*u,u=u/d,v=v*h;return y/a}};window.s=function(){if(a){A.width=F.width=X.width=innerWidth;A.height=F.height=X.height=innerHeight;var d=U;U=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,U);a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,A.width,A.height);a.bindTexture(a.TEXTURE_2D,T);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,F.width,F.height,0,a.RGBA,a.UNSIGNED_BYTE,null);a.bindTexture(a.TEXTURE_2D,R);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,F.width,F.height,0,a.RGBA,a.UNSIGNED_BYTE,null);a.bindFramebuffer(a.FRAMEBUFFER,F);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,U);a.bindFramebuffer(a.FRAMEBUFFER,X);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,U);a.viewport(0,0,A.width,A.height);d&&a.deleteRenderbuffer(d)}};window.f=function(){A=d.e("c");a=A.getContext("webgl",{premultipliedAlpha:!1});c.style.width=c.style.height="100%";F=a.createFramebuffer();a.bindFramebuffer(a.FRAMEBUFFER,F);T=a.createTexture();a.bindTexture(a.TEXTURE_2D,T);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,A.width,A.height,0,a.RGBA,a.UNSIGNED_BYTE,null);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,T,0);X=a.createFramebuffer();R=a.createTexture();a.bindFramebuffer(a.FRAMEBUFFER,X);a.bindTexture(a.TEXTURE_2D,R);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,A.width,A.height,0,a.RGBA,a.UNSIGNED_BYTE,null);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,R,0);oa=a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT;a.clearColor(0,0,0,1);a.clear(oa);a.enable(a.CULL_FACE);a.enable(a.DEPTH_TEST);a.depthFunc(a.LEQUAL);a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA);Ba=a.getExtension("OES_standard_derivatives");s();var G=function(r,ja,e,Ea,g,b,f){r=d.e(r).textContent;ja=d.e(ja).textContent.replace("@",d.e("x").textContent);ja=ja.replace("~",Ba?d.e("~").textContent:"");var P=a.createShader(a.VERTEX_SHADER),H=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(P,r);a.shaderSource(H,ja);a.compileShader(P);a.compileShader(H);var k=a.createProgram();a.attachShader(k,P);a.attachShader(k,H);a.linkProgram(k);k.v=a.getAttribLocation(k,"v");a.enableVertexAttribArray(k.v);var p=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,p);a.bufferData(a.ARRAY_BUFFER,new Q(e),a.STATIC_DRAW);if(g){k.n=a.getAttribLocation(k,"n");a.enableVertexAttribArray(k.n);var l=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,l);a.bufferData(a.ARRAY_BUFFER,new Q(g),a.STATIC_DRAW)}k.s=[];if(b)for(r=0;r<b.length;r++)k.s[r]=a.getUniformLocation(k,"s"+r);k.b=a.getUniformLocation(k,"A");k.c=a.getUniformLocation(k,"C");k.d=a.getUniformLocation(k,"B");k.e=a.getUniformLocation(k,"E");k.f=a.getUniformLocation(k,"F");k.g=a.getUniformLocation(k,"D");var q=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,q);a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array(Ea),a.STATIC_DRAW);k.draw=function(){f?(a.enable(a.BLEND),a.depthMask(!1)):(a.disable(a.BLEND),a.depthMask(!0));a.bindBuffer(a.ARRAY_BUFFER,p);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,q);a.useProgram(k);a.vertexAttribPointer(k.v,4,a.FLOAT,!1,0,0);g&&(a.bindBuffer(a.ARRAY_BUFFER,l),a.vertexAttribPointer(k.n,3,a.FLOAT,!1,0,0));for(var r=0;r<k.s.length;r++)a.activeTexture(a["TEXTURE"+r]),a.bindTexture(a.TEXTURE_2D,b[r]==T?R:b[r]),a.uniform1i(k.s[r],r);k.b&&a.uniformMatrix4fv(k.b,!1,va);k.c&&a.uniform4fv(k.c,wa);k.d&&a.uniformMatrix4fv(k.d,!1,h);k.e&&a.uniformMatrix4fv(k.e,!1,pa);k.f&&a.uniform4fv(k.f,n);k.g&&a.uniform4fv(k.g,S);a.drawElements(a.TRIANGLES,Ea.length,a.UNSIGNED_SHORT,0)};return k},J=function(r){var d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,r);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST);a.generateMipmap(a.TEXTURE_2D);a.bindTexture(a.TEXTURE_2D,null);return d},Z=function(a,e,O,b){var g=d.createElement("canvas");g.width=g.height=a;for(var f=g.getContext("2d"),K=f.createImageData(a,a),P=K.data,H=0;H<a*a*4;H+=4)P[H]=O[0],P[H+1]=O[1],P[H+2]=O[2],P[H+3]=O[3];O=2*Math.PI;for(H=0;H<e.length;H++)for(var k=e[H],p=new la(k.o,k.a,k.r,k.s),h=0,n=0;n<a;n++)for(var l=0;l<a;l++){for(var q=(4+1*Math.cos(O*n/a))*Math.cos(O*l/a),m=(4+1*Math.cos(O*n/a))*Math.sin(O*l/a),t=1*Math.sin(O*n/a),q=Math.abs(p.noise(b?q:l/a,b?m:n/a,b?t:0)),m=0;3>m;m++,h++)P[h]+=q*k.c[m]*k.c[3];h++}f.putImageData(K,0,0);return J(g)},U=function(a,d){for(var e=new Q(16),b=0;4>b;b++)for(var g=0;4>g;g++)for(var f=e[4*g+b]=0;4>f;f++)e[4*g+b]+=a[4*f+b]*d[4*g+f];return e},ca=function(){requestAnimationFrame(ca);var r=performance.now();B=sa?(r-sa)/(1E3/60):1;sa=r;Da[v]&&Da[v](B);r=X;X=F;F=r;r=R;R=T;T=r;a.bindFramebuffer(a.FRAMEBUFFER,F);a.clear(oa);var r=A.width/A.height,d=1/Math.tan(45*Math.PI/360);pa=new Q([d/r,0,0,0,0,d,0,0,0,0,-1.00001000005,-1,0,0,-.200001000005,0]);va=U(pa,h);wa=new Q([r,Ga++/10,-h[13],A.height]);for(r=0;r<ba.length;r++)ba[r].draw();a.bindFramebuffer(a.FRAMEBUFFER,null);ba.length&&xa.draw()},ha=function(a,d){var b=a+e/2,f=d+e/2,g=Math.floor(b),n=Math.floor(f),b=Math.ceil(b),f=Math.ceil(f),K=function(a,r){return Math.max(ka,q[a]&&q[a][r]||0)};return Math.max(K(g,n),Math.max(K(g,f),Math.max(K(b,n),K(b,f))))+.4},l=function(){for(var a=0;a<L;a++)if(C[a]&&n[4*a+3]){var d=C[a].x-n[4*a],b=C[a].z-n[4*a+2],f=Math.sqrt(d*d+b*b);f<=da*B?(n[4*a]=C[a].x,n[4*a+2]=C[a].z,u&1||8<u?(da=.07+u/20,C[a].x=(Math.random()-.5)*e*.9,C[a].z=(Math.random()-.5)*e*.9):C[a]=null):(d*=da/f,b*=da/f,n[4*a]+=d*B,n[4*a+2]+=b*B);n[4*a+1]=.5*n[4*a+1]+.5*(ha(n[4*a],n[4*a+2])+3.5)}for(a=0;3>a;a++)S[a]=Math.min(1,S[a]+.018)},Ca=function(){N=2==v?.5*((M[83]||M[40]||0)-(M[87]||M[38]||0))||.95*N:.95*N;Y=2==v?.04*((M[65]||M[37]||0)-(M[68]||M[39]||0))||.87*Y:.87*Y;.001>Math.abs(N)&&(N=0);.001>Math.abs(Y)&&(Y=0);if(N){h[14]-=N*B;p[0]+=N*h[2]*B;p[2]+=N*h[10]*B;var a=ha(p[0],p[2]);h[13]=-(p[1]=a>p[1]?.5*a+.5*p[1]:.9*p[1]+.1*a)}var d=Y*B,a=Math.cos(d),d=Math.sin(d),a=new Q([a,0,d,0,0,1,0,0,-d,0,a,0,0,0,0,1]);h=U(a,h);a=Math.sqrt(h[2]*h[2]+h[10]*h[10]);h[8]=-(h[2]/=a);h[0]=h[10]/=a},Da=[function(){if(Aa){ra();for(var a=0;6>a;a++)qa(a);v=4;setTimeout(function(){v=5;d.e("s").textContent="Click to start"},3E3)}},function(){S[3]=0<S[3]?S[3]-.003*B:0;var a=Math.cos(ga),d=Math.sin(ga);.999<=a&&(a=1,d=0);h[5]=h[10]=a;h[9]=-(h[6]=d);ga-=.0058*B;h[14]=Math.min(h[14]+.2*B,-110);l();d||(ba.splice(ba.indexOf(Fa),1),v=2,za=Date.now())},function(){var a=Math.floor(Math.max(10>u?60:10,60-3*u)-(Date.now()-za)/1E3);a!=ea&&(d.e(".").textContent=ea=a);if(0>=a)v=3,fa(),setTimeout(m,1E3),ua("too slow");else for(Ca(),l(),a=0;a<L;a++)if(n[4*a+3]){var b=p[0]-n[4*a],e=p[2]-n[4*a+2];if(49>b*b+e*e){for(e=b=0;e<L;e++)b+=n[4*e+3];a==b-1?(S=new Q([y[a].r,y[a].g,y[a].b,0]),n[4*a+3]=0,e="yeah;good;well done;great;correct;yes;good memory;keep going;awesome;cool;ok;whoo hoo;nice one;excellent".split(";"),d.e(",").textContent=V+=10*(u+1),d.e("9").style.opacity=1,setTimeout(function(){d.e("9").style.opacity=0},250),qa(y[a].i),--b||(v=4,setTimeout(z,800))):(S=new Q([y[a].r,y[a].g,y[a].b,1]),n[4*a+3]=0,v=3,e="that was wrong;nope;damn;oh no;wrong one;whoops".split(";"),fa(),setTimeout(m,1E3));ua(e[Math.floor(Math.random()*e.length)])}}},function(){Ca();l()}],aa=function(a,d,e,b){0>a&&(a+=b);a>b&&(a-=b);0>d&&(d+=b);d>b&&(d-=b);return e[a]&&e[a][d]||0},Ha=function(a){for(var d=[],b=[],e=[],g=0;g<a.length;g++){var f=a[g];d.push(g,0,0,0,g,0,0,9999,g,0,0,9999.999,g,0,0,.999);b.push(4*g,4*g+2,4*g+1,4*g,4*g+3,4*g+2);for(var K=0;4>K;K++)e.push(f.r,f.g,f.b)}return G("j","k",d,b,e,[R],!0)},ta=function(){u||(d.e(",").textContent=V=0);d.e("0").style.display="";var a=function(){for(var b=0;b<y.length;b++)y[b].d.style.width=y[b].d.style.height=0;d.e("$").style.opacity=d.e("2").style.opacity=1;d.e("$").style.display=d.e("2").style.display="";d.e("1").removeEventListener("click",a);setTimeout(function(){ra();v=4;d.e("2").style.opacity=0;d.e("$").style.opacity=1;d.e("0").style.display="none";setTimeout(Ia,1E3)},500)};d.e("1").addEventListener("click",a);d.e("$").style.opacity=0;v=4;for(var f=document.querySelectorAll(".j"),h=0;h<f.length;h++)d.e("v").removeChild(f[h]);d.e("!").textContent=u+1;L=Math.min(6,Math.floor(3+u/2));for(var l=[{r:1,g:1,b:0,n:"yellow",i:0},{r:0,g:0,b:1,n:"blue",i:1},{r:0,g:1,b:0,n:"green",i:4},{r:1,g:0,b:0,n:"red",i:3},{r:0,g:1,b:1,n:"cyan",i:2},{r:1,g:0,b:1,n:"purple",i:5}],h=0;h<L;h++){var f=Math.floor(Math.random()*L),g=Math.floor(Math.random()*L),p=l[f];l[f]=l[g];l[g]=p}y.length=n.length=C.length=0;for(var K=ha(0,0)+3.5,h=0;h<L;h++)(function(a){y.push(l[a]);n.push(0,K,0,0);if(a<L-1){do{var g={x:(Math.random()-.5)*e*.8,z:(Math.random()-.5)*e*.8},f=100;for(b=0;b<a;b++)var r=C[b].x-g.x,h=C[b].z-g.z,f=Math.min(f,r*r+h*h)}while(10>g.x*g.x+g.z*g.z||100>f)}else g={x:0,z:90};C.push(g);l[a].d=document.createElement("div");l[a].d.className="j";l[a].d.style.background=l[a].n;d.e("v").appendChild(l[a].d);setTimeout(function(){l[a].d.style.marginTop="5%"},1500*a+1E3)})(h);ya=Ha(y);setTimeout(function(){d.e("1").style.display=""},1500*L+500)},Ia=function(){ba=[Ja,Ka,La,Fa,ya];N=Y=0;da=2;for(f=0;f<L;f++)n[4*f+3]=1;v=1;S[3]=1;h=[1,0,0,0,0,0,1,0,0,-1,0,0,0,-1.2,-150,1];p[0]=0;p[2]=110;h[13]=-(p[1]=ha(p[0],p[2]));d.e(".").textContent=ea=Math.max(10>u?60:10,60-3*u);ga=Math.PI/2;d.e("_").style.display=""},ua=function(a){var b=window.SpeechSynthesisUtterance,e=window.speechSynthesis;b&&e&&(b=new b(a),b.voice=e.getVoices()[1],b.rate=.7,e.speak(b));d.e("%").className="k";d.e("%").offsetWidth=d.e("%").offsetWidth;d.e("%").textContent=a;d.e("%").className="b"},m=function(){u=0;d.e("5").style.display="";d.e("_").style.display="none";d.e("p").textContent=V;var a=localStorage.b||0;V>=a?(localStorage.b=V,d.e("q").style.display="",d.e("o").textContent=""):(d.e("q").style.display="none",d.e("o").textContent="best: "+a)},z=function(){fa();d.e("$").style.opacity=d.e("2").style.opacity=0;d.e("$").style.display=d.e("2").style.display="";d.e(":").textContent="W3LL DON3";d.e("s").style.display="none";setTimeout(function(){d.e("$").style.opacity=d.e("2").style.opacity=1;d.e("+").textContent="Time bonus: "+(u+1)*ea;d.e("+").className="k";d.e("+").offsetWidth=d.e("+").offsetWidth;d.e("+").className="l";d.e(",").textContent=V+=(u+1)*ea;u++;setTimeout(function(){d.e("$").style.opacity=d.e("2").style.opacity=0;d.e("1").style.display=d.e("_").style.display="none";ta();setTimeout(function(){d.e("$").style.display=d.e("2").style.display="none";d.e(":").textContent="R3V3RS3 IT!";d.e("s").style.display=""},2E3)},1500)},500)};d.e("6").addEventListener("click",function(){d.e("5").style.display=d.e("1").style.display="none";ta()});(function(){var a=new AudioContext,d=a.createGain();d.connect(a.destination);var b=a.createDynamicsCompressor();b.connect(d);for(var e=[16.35,18.35,20.6,21.83,24.5,27.5,30.87],g=0;8>g;g++)for(var f=0;7>f;f++)e[String.fromCharCode(65+(f+2)%7)+g]=e[f]*Math.pow(2,g);for(var h=[],g=0;6>g;g++)h.push(new OfflineAudioContext(1,3080700,44010));for(var f=function(a){var d=h[0].createOscillator(),b=h[0].createGain();d.connect(b);d.frequency.setValueAtTime(150,a);b.gain.setValueAtTime(3,a);d.frequency.exponentialRampToValueAtTime(.01,a+.5);b.gain.exponentialRampToValueAtTime(.01,a+.5);b.connect(h[0].destination);d.start(a);d.stop(a+.5)},l=a.createBuffer(1,44010,44010),n=l.getChannelData(0),g=0;44010>g;g++)n[g]=2*Math.random()-1;for(var n=function(a){var d=h[1].createBufferSource();d.buffer=l;var b=h[1].createBiquadFilter();b.type="highpass";b.frequency.value=1E3;d.connect(b);var e=h[1].createGain();b.connect(e);e.connect(h[1].destination);b=h[1].createOscillator();b.type="triangle";var f=h[1].createGain();b.connect(f);f.connect(h[1].destination);e.gain.setValueAtTime(1,a);e.gain.exponentialRampToValueAtTime(.01,a+.2);d.start(a);b.frequency.setValueAtTime(100,a);f.gain.setValueAtTime(.7,a);f.gain.exponentialRampToValueAtTime(.01,a+.1);b.start(a);b.stop(a+.2);d.stop(a+.2)},k=function(a){var d=h[3].createBufferSource();d.buffer=l;var b=h[3].createBiquadFilter();b.type="highpass";b.frequency.value=1E4;d.connect(b);var e=h[3].createGain();b.connect(e);e.connect(h[3].destination);e.gain.setValueAtTime(.7,a);e.gain.exponentialRampToValueAtTime(.5,a+.05);e.gain.exponentialRampToValueAtTime(.01,a+.1);d.start(a);d.stop(a+.1)},p=function(a,d,b){var e=h[2].createOscillator();e.type="sawtooth";var f=h[2].createGain();e.connect(f);f.connect(h[2].destination);e.frequency.setValueAtTime(a,b);f.gain.setValueAtTime(.25,b);f.gain.exponentialRampToValueAtTime(.01,b+d);var g=h[2].createOscillator();g.connect(f);g.frequency.setValueAtTime(a/2,b);f=h[2].createOscillator();f.type="triangle";var k=h[2].createGain();f.connect(k);k.connect(h[2].destination);f.frequency.setValueAtTime(a,b);k.gain.setValueAtTime(.3,b);k.gain.setValueAtTime(.3,b+.9*d);k.gain.exponentialRampToValueAtTime(.01,b+d);e.start(b);e.stop(b+d);g.start(b);g.stop(b+d);f.start(b);f.stop(b+d)},q=[],g=0;2>g;g++){q[g]=h[g+4].createGain();var m=h[g+4].createDelay(),t=h[g+4].createGain(),v=h[g+4].createGain(),u=h[g+4].createBiquadFilter();m.delayTime.value=.25;t.gain.value=v.gain.value=.4;u.type="lowpass";u.frequency.value=1E3;u.connect(h[g+4].destination);q[g].connect(u);q[g].connect(m);m.connect(t);m.connect(v);t.connect(m);v.connect(u)}for(var m=function(a,d,b){var e=h[5].createOscillator(),f=h[5].createGain();e.connect(f);f.connect(q[1]);e.frequency.setValueAtTime(a,b);f.gain.setValueAtTime(.5,b);f.gain.setTargetAtTime(.001,b+.5*d,.3);e.start(b);e.stop(b+d)},t=function(a,b,d){var e=h[4].createOscillator();e.type="triangle";var f=h[4].createGain();e.connect(f);f.connect(q[0]);e.frequency.setValueAtTime(a,d);f.gain.setValueAtTime(.6,d);f.gain.setTargetAtTime(5E-4,d+.5*b,.5);e.start(d);e.stop(d+b)},v="C2 C2 C2 C2 C2 C2 C2 C2 F1 F1 F1 F1 G1 G1 A1 B1".split(" "),u="C5 C5 E5 E5 C5 C5 E5 E5 F5 E5 D5 C5 G4 G4 B4 C5 C5 G5 G5 C6 C6 G5 E5 F5 E5 D5 C5 G5 F5 D5 B4".split(" "),z="C6 E6 G6 C7 E6 G6 C7 C6 E6 G6 C7 E6 G6 C7 F5 A5 C6 F6 A5 C6 F6 G5 B5 D6 G6 B5 D6 G6".split(" "),w=a.currentTime+1,g=0;512>=g;g++){g%4||f(w+.125*g);(g+4)%8||n(w+.125*g);!(12<g%16)&&(g+2)%4||k(w+.125*g);(g+2)%4||p(e[v[Math.floor(g/4)%16]],.5,w+.125*g);var x=u[Math.floor(g/2)%64];g%4||!x||m(e[x],.1,w+.125*g);x=z[Math.floor(g/2)%32];g%4||!x||t(e[x],.1,w+.125*g)}var A=[],y=[],B=[];h.forEach(function(d,e){d.startRendering().then(function(d){var f=a.createGain();f.connect(b);A[e]=d;6==y.push(f)&&(Aa=1)})});fa=function(){d.gain.setTargetAtTime(.001,a.currentTime+1,.5);for(var b=0;6>b;b++)B[b].stop(a.currentTime+4.5)};ra=function(){d.gain.setValueAtTime(1,a.currentTime);for(var b=B.length=0;6>b;b++){var e=a.createBufferSource();e.buffer=A[b];y[b].gain.value=0;e.connect(y[b]);e.start(a.currentTime+1);B.push(e)}};qa=function(a){y[a].gain.value=1}})();var t=d.e("$"),D=function(){t.style.display="none";d.e("2").removeChild(d.e("t"));d.e("s").textContent="Loading";t.style.background="#fff";t.removeEventListener("transitionend",D);var a=d.e("2");a.style.transition="opacity 2s";a.addEventListener("transitionend",function(){"0"==a.style.opacity&&(a.style.display=t.style.display="none")})};t.addEventListener("transitionend",D);d.e("%").addEventListener("animationend",function(){d.e("%").className="k"});d.e("+").addEventListener("animationend",function(){d.e("+").className="k"});ua("");na("keydown",function(a){M[a.keyCode]=1});na("keyup",function(a){M[a.keyCode]=0});na("click",function(a){5==v&&(fa(),ta())});for(var e=256,w=new la(6,2,2),E=9999,I=-E,f=0;f<e;f++)for(q[f]=[],b=0;b<e;b++)I=Math.max(I,q[f][b]=Math.abs(w.noise(f/e,b/e,0))),E=Math.min(E,q[f][b]);for(f=0;f<e;f++)for(b=0;15>b;b++)x=b/15,q[f][b]*=x,q[f][e-1-b]*=x,q[b][f]*=x,q[e-1-b][f]*=x;for(f=0;f<e;f++)for(b=0;b<e;b++)q[f][b]=15*(q[f][b]-E)/(I-E);E=d.createElement("canvas");E.width=E.height=e;for(var I=E.getContext("2d"),w=I.createImageData(e,e),W=w.data,x=0,b=0;b<e;b++)for(var f=0;f<e;f++,x+=4)W[x]=Math.floor(255*q[f][b]/15),W[x+3]=255;I.putImageData(w,0,0);E=J(E);I=[];w=[];for(b=0;b<e;b++)for(f=0;f<e;f++){I.push(-e/2+f,q[f][b],-e/2+b,f/e+Math.floor(1E4*b/e-1));var W=15*(aa(f+1,b,q,e)-aa(f-1,b,q,e)),ia=15*(aa(f,b+1,q,e)-aa(f,b-1,q,e)),x=Math.sqrt(W*W+900+ia*ia);w.push(W/x,30/x,ia/x)}aa=[];for(b=0;b<e-1;b++)for(f=0;f<e-1;f++)aa.push(f+b*e,f+(b+1)*e+1,f+b*e+1,f+b*e,f+(b+1)*e,f+(b+1)*e+1);var x=Z(256,[{o:4,a:1.5,r:2,s:2,c:[235,221,61,5]},{o:3,a:1.5,r:6,s:5,c:[255,255,255,1]}],[252,237,70,255],1),W=Z(256,[{o:3,a:2,r:2,s:2,c:[95,235,61,.7]},{o:5,a:2,r:2,s:2,c:[200,-60,0,10]}],[53,161,27,255],1),ia=Z(256,[{o:5,a:2,r:2,s:1,c:[128,128,128,12]},{o:3,a:2,r:3,s:5,c:[-40,-40,-40,120]}],[116,89,46,255],1),ma=Z(1024,[{o:4,a:1.3,r:2,s:3,c:[255,0,0,6.5]},{o:4,a:1.3,r:2,s:2,c:[0,255,0,5]},{o:4,a:2,r:2,s:2,c:[0,0,255,15]}],[0,0,0,255],0),Z=Z(1024,[{o:4,a:1.3,r:2,s:0,c:[150,150,0,1]},{o:4,a:2,r:2,s:0,c:[80,80,0,1]}],[0,0,255,255],1),Ma=function(){var a=d.createElement("canvas");a.width=a.height=e;for(var b=a.getContext("2d"),f=b.createImageData(e,e),h=f.data,g=2*Math.PI,l=new la(8,2,3,0),n=new la(4,3,1.5,0),p=0,q=0;q<e;q++)for(var k=0;k<e;k++){for(var m=[],t=-1;2>t;t++){m[t]=[];for(var u=-1;2>u;u++){var v=(4+1*Math.cos(g*(q+u)/e))*Math.cos(g*(k+t)/e),w=(4+1*Math.cos(g*(q+u)/e))*Math.sin(g*(k+t)/e),x=1*Math.sin(g*(q+u)/e);m[t][u]={a:Math.abs(l.noise(v,w,x)),b:Math.abs(n.noise(v,w,x))}}}h[p++]=Math.floor(1024*(m[-1][0].a+m[1][0].a-2*m[0][0].a)+128);h[p++]=Math.floor(1024*(m[0][-1].a+m[0][1].a-2*m[0][0].a)+128);h[p++]=Math.floor(1024*(m[-1][0].b+m[1][0].b-2*m[0][0].b)+128);h[p++]=Math.floor(1024*(m[0][-1].b+m[0][1].b-2*m[0][0].b)+128)}b.putImageData(f,0,0);return J(a)}(),Ja=G("a","b",I,aa,w,[x,W,ia,ma,Ma]),Ka=G("e","f",[-1,-1,0,9999,1,-1,0,9999.999,1,1,0,.999,-1,1,0,0],[0,1,2,0,2,3],0,[ma]),ka=1,La=G("a","g",[3*-e/2,ka,3*-e/2,1E4,3*e/2-1,ka,3*-e/2,10000.999,3*e/2-1,ka,3*e/2-1,.999,3*-e/2,ka,3*e/2-1,0],[0,2,1,0,3,2],0,[Z,E,R,ma],!0),Fa=G("l","m",[-1,-1,0,9999,1,-1,0,9999.999,1,1,0,.999,-1,1,0,0],[0,1,2,0,2,3],0,[ma],1);xa=G("h","i",[-1,-1,0,0,1,-1,0,.999,1,1,0,10000.999,-1,1,0,1E4],[0,1,2,0,2,3],0,[T]);h[13]=-(p[1]=ha(p[0],p[2]));ca()}})();</script>