- Author:
- Pogocsan Florin
- Twitter:
- @
- GitHub:
- Facebook:
- Google+:
- +
- Reddit:
- /r/
- Pouet:
- Website:
- Compo:
- classic
- Demo link:
- https://js1k.com/2010-first/demo/774
- Shortlink:
- https://js1k.com/774
- Blog post:
- please update here!
- Bytes:
- 139
- Chars:
- 139
- Submission
t=document.body.children[0].getContext('2d');var x=0,y=90;setInterval('if(y>0)(x&1)?t.fillRect(x,x,y,y):t.clearRect(x,x,y,y),x+=3,y-=6',90)
- Description
- Alternate squares, fits in a tweet :)
- Base64 encoded
dD1kb2N1bWVudC5ib2R5LmNoaWxkcmVuWzBdLmdldENvbnRleHQoJzJkJyk7dmFyIHg9MCx5PTkwO3NldEludGVydmFsKCdpZih5PjApKHgmMSk/dC5maWxsUmVjdCh4LHgseSx5KTp0LmNsZWFyUmVjdCh4LHgseSx5KSx4Kz0zLHktPTYnLDkwKQ==
- Original source
ctx=document.body.children[0].getContext('2d');
var x = 0, len = 90;
function draw()
{
if (len > 0)
{
//clear or draw square
(x & 1) ? ctx.fillRect(x,x,len,len) : ctx.clearRect(x,x,len,len);
x += 3;
len -= 6;
}
}
setInterval(draw, 90);