Skip to content

Instantly share code, notes, and snippets.

@jena-th
Created July 1, 2012 13:54
Show Gist options
  • Select an option

  • Save jena-th/3028492 to your computer and use it in GitHub Desktop.

Select an option

Save jena-th/3028492 to your computer and use it in GitHub Desktop.
Demo for Angelspit
var
cx = (c = document.getElementById('c')).getContext('2d'),
size=800,
ra=Math.random,
cE=Math.ceil,
w = window,
d=document,
UC=function(c){return String.fromCharCode(parseInt(c,16))}
u = 1,
f=255,
pol= ' sans-serif';
bed=UC(2592),
s = w.mozAnimationStartTime,
rAf = w.mozRequestAnimationFrame,
ff = [
null,
'volution',
'signation',
'volution'
]
;
d.bgColor='#000';
c.style.margin = 'auto';
c.style.display='block';
c.width=c.height=c.style.height=c.style.width=size;
for(i=0;i<5;i++)bed+=bed;
init = function(tst) {
u=!u*(Math.random()*2+1);
cx.fillStyle = 'rgba(0,0,0,100)';
cx.fillRect(0,0,size,size);
cx.font = '50px'+pol;
cx.fillStyle = '#'+size;
for(i=0;i<21;i++)cx.fillText(bed,-u*ra(),i*40);
cx.font = '250px'+pol;
cx.fillStyle = '#aa0';
cx.fillText(UC('26'+ra()*100+'b'),ra()*50,200+ra()*50);
cx.fillStyle = '#fff';
for(k=0;k<5;k++)
cx.fillRect(0,300 + (k*50*2),u*(ra()*100)*(ra()*20),50);
cx.font = '50px'+pol;
cx.fillStyle = '#'+cE(ra()*10)+'00';
cx.fillText('Fuck the', f, 230);
cx.font = '100px'+pol;
cx.fillStyle = '#'+cE(ra()*ra()*1000);
cx.fillText('Re', 250, 300);
cx.fillStyle = '#'+cE(ra()*ra()*1000);
cx.fillText(ff[cE(ra()*ra()*10)], 380, 300);
cx.font = '50px'+pol;
cx.fillStyle = '#005';
for(i=0;i<21;i++)cx.fillText(bed,u,i*40);
cx.fillStyle = '#000';
for(i=0;i<21;i++)cx.fillText(bed,u,i*40);
p = tst - s;
if (p < Math.pow(9,9)) {
rAf(init);
}
return true;
};
rAf(init);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment