- Author:
- #ponce
- Twitter:
- @
- GitHub:
- Facebook:
- Google+:
- +
- Reddit:
- /r/
- Pouet:
- Website:
- gamesfrommars.fr
- Compo:
- classic
- Demo link:
- https://js1k.com/2012-love/demo/1115
- Shortlink:
- https://js1k.com/1115
- Blog post:
- please update here!
- Bytes:
- 431
- Chars:
- 431
- Submission
c.width=W=innerWidth-21;c.height=H=innerHeight-21;a.shadowBlur=5;a.shadowColor='#000';t=0;A=16;M=Math;s="0123456789abcdef";function frame(){t+=.5;for(i=0;i<H/16;++i)for(j=0;j<W/16;++j){E=i-H/32+M.sin(t/4)*t;F=j-W/46+M.cos(t/4)*t;D=E*E+F*F+M.abs(F)*E;C=(D/20-t)&15;for(k=0;k<2;++k){S=(k?9:15)*M.exp(-D/50);U=s[k?15-C:C];a.fillStyle='#'+U+((i^j)&1?U+U:48);if(S >=1){a.fillRect(j*A+k*3,i*A+k*3,S,S+t*t/1000);}}}}setInterval(frame,40);
- Description
- shadowBlur is still cute.
- Base64 encoded
Yy53aWR0aD1XPWlubmVyV2lkdGgtMjE7Yy5oZWlnaHQ9SD1pbm5lckhlaWdodC0yMTthLnNoYWRvd0JsdXI9NTthLnNoYWRvd0NvbG9yPScjMDAwJzt0PTA7QT0xNjtNPU1hdGg7cz0iMDEyMzQ1Njc4OWFiY2RlZiI7ZnVuY3Rpb24gZnJhbWUoKXt0Kz0uNTtmb3IoaT0wO2k8SC8xNjsrK2kpZm9yKGo9MDtqPFcvMTY7KytqKXtFPWktSC8zMitNLnNpbih0LzQpKnQ7Rj1qLVcvNDYrTS5jb3ModC80KSp0O0Q9RSpFK0YqRitNLmFicyhGKSpFO0M9KEQvMjAtdCkmMTU7Zm9yKGs9MDtrPDI7KytrKXtTPShrPzk6MTUpKk0uZXhwKC1ELzUwKTtVPXNbaz8xNS1DOkNdO2EuZmlsbFN0eWxlPScjJytVKygoaV5qKSYxP1UrVTo0OCk7aWYoUyA+PTEpe2EuZmlsbFJlY3QoaipBK2sqMyxpKkErayozLFMsUyt0KnQvMTAwMCk7fX19fXNldEludGVydmFsKGZyYW1lLDQwKTs=
- Original source
var W = innerWidth-21;
var H = innerHeight-21;
c.width = W;
c.height = H;
// var blurRadius = Math.min(W,H) / 11;
a.shadowBlur= 5;
a.shadowColor='#000';
var CX = W/2;
var CY = H/2;
var dt = 0;
function frame()
{
dt += 1;
a.strokeStyle = '#fde';
var s = "0123456789abcdef";
for (var i = 0; i < H/16; ++i)
for (var j = 0; j < W/16; ++j)
{
var cx = Math.sin(dt/7);
var cy = Math.cos(dt/7);
var dx = i - CY/16 + cx * dt/2;
var dy = j - CX/16 + cy * dt/2;
var dist = dx*dx+dy*dy + Math.abs(dy)*dx;
var color = (dist*0.05-dt*0.5)&15;
var x = j * 16;
var y = i * 16;
for (var k = 0; k < 2; ++k)
{
var S = k?9:15;
S *= Math.exp(-dist*0.02);
var U = s[k?15-color:color];
a.fillStyle = '#'+U+((i^j)&1?U+U:'48');
if (S >=1)
{
if (k == 0)
{
a.fillRect(x, y, S,S);
}
else
{
a.fillRect(x+3, y+3, S, S);
}
}
}
}
}
setInterval(frame, 40);