JS1k: The JavaScript code golfing competition
2018 - The Volatile Coin Mine
Author: nom de nom
Twitter: @
GitHub:
Facebook:
Google+: +
Reddit: /r/
Pouet: nom de nom
Website: nickm.com
Compo: canvas
Demo link: https://js1k.com/2018-coins/demo/3154
Shortlink: https://js1k.com/3154
Blog post: please update here!
Bytes: 512
Chars: 512
Submission
g=String;p=x=>g(x)+'px';r=Math.random;z='#fff';setInterval("c=b.children;l=r()+1;v=document.createElement('div');b.appendChild(v).innerText='\u2009'+String.fromCharCode(8352+r()*31);s=v.style;s.color=z;s.position='fixed';s.fontSize=p(l*50);s.width=s.height=p(l*75);s.borderRadius='50%';s.border='1px\x20solid';s.top=p(r()*800);s.left=p(r()*b.clientWidth);s.transform='rotate('+7*r()+'rad)';if(99<c.length){b.removeChild(c[0]);for(i=99;i--;i){q=~~(i/10);y=c[i].style;y.color=z+g(q);y.background='#dc'+g(9-q)}}",5)
Description
"Hold, here’s more gold for thee." -Shakespeare
This pure JS demo plunges into the purses of CSS and Unicode to grab an ever-accumulating, ever-fading supply of coins. While also digging into the traditions of concrete poetry, this demo weighs in at only 512b, half the required size.
If you have a default font that includes the Bitcoin symbol and would like it to appear, just change "31" to "32".
Base64 encoded
Zz1TdHJpbmc7cD14PT5nKHgpKydweCc7cj1NYXRoLnJhbmRvbTt6PScjZmZmJztzZXRJbnRlcnZhbCgiYz1iLmNoaWxkcmVuO2w9cigpKzE7dj1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtiLmFwcGVuZENoaWxkKHYpLmlubmVyVGV4dD0nXHUyMDA5JytTdHJpbmcuZnJvbUNoYXJDb2RlKDgzNTIrcigpKjMxKTtzPXYuc3R5bGU7cy5jb2xvcj16O3MucG9zaXRpb249J2ZpeGVkJztzLmZvbnRTaXplPXAobCo1MCk7cy53aWR0aD1zLmhlaWdodD1wKGwqNzUpO3MuYm9yZGVyUmFkaXVzPSc1MCUnO3MuYm9yZGVyPScxcHhceDIwc29saWQnO3MudG9wPXAocigpKjgwMCk7cy5sZWZ0PXAocigpKmIuY2xpZW50V2lkdGgpO3MudHJhbnNmb3JtPSdyb3RhdGUoJys3KnIoKSsncmFkKSc7aWYoOTk8Yy5sZW5ndGgpe2IucmVtb3ZlQ2hpbGQoY1swXSk7Zm9yKGk9OTk7aS0tO2kpe3E9fn4oaS8xMCk7eT1jW2ldLnN0eWxlO3kuY29sb3I9eitnKHEpO3kuYmFja2dyb3VuZD0nI2RjJytnKDktcSl9fSIsNSk=
Original source
Original source not submitted
<< prev
3154
next >>