JS1K


m="left|width|height|top|background|color|position".split('|');q=Math.random;A=
120;d=(r=document)[N='createElement']('textarea');k=r[N]('a');k[D='style'][m[6]
]=U='absolute';n={6:U,0:0,3:0,1:z='300px',2:z,4:T='transparent',5:T};for(x in n
)c[D][m[x]]=d[D][m[x]]=n[x];k[D][m[0]]=(c[m[1]]=c[m[2]]=v=parseInt(z))+14+'px';
b[C='appendChild'](d);b[C](k);e=c.getContext('2d');s=[];L='length';d.onkeyup=f=
function(k){c[m[1]]=v;e.font=d[D].font='14px arial';n=d.value.split('\n');l=0;
for(x in n)e.fillText(n[x],3,l+=F=14);l=e.getImageData(0,0,v,v),o=l.data;for(i=
0;O=s[i],i<s[L];i++){o[O[0]]==0&&(s[i]=[0]);for(j=0;j<O[L];j+=2){r=q();o[O[j]-2
]=O[j+1]+F*r+A;o[O[j]]=2*A;if(O[L]>F)continue;r<.05&&s[i].push(O[j]+A*10,A*r)||
r<.1&&s[i].push(O[j]+4,A*r)}}for(i=0;!k&&i<o[L];i+=4)if(o[i+3]!=0&&q()<1/s[L])s
.push([i+3,A]);s=s.filter(function(n){return n[L]>1});e.putImageData(l,0,0)};g=
"lufituaeB = erutaN = modnaR".split('');setInterval("n=g.length&&(d.value+=g.
pop());f(f(n))",v);k.innerText="Add your own Text and let the Moss take over"

See it Here

Published
Categorized as Post