Renders some bitcoins in a timely fashion then things go weird and universe collapses. Will add sounds next time.
_=' Gd){K$CC4U closeP,1<0Bwhite" C32j3j24CU,5OC_<0,6$27j150^8j1219_125,25,<O__U@@@@@} Xx,y,s,r,t){Ksave x,yBrL(r*H/180Bscale(s,sB-C-3GtBsto}Q=z=wZdow.questAnimakFrame,`=M.`om,w=a.width,h=a.height,D=s=[];slL=[EE3,3],=c},.prLLype={c:n=Dx]*w/4y+1]*h/4r=<*`-5Yd=0},~:%<==dN2Tr>0?rN:r--4TY)6Ts=5@<top.load},W:Xxysrd)}};QmaZ=KcleVw,h^%60==4>D&&(s.push(new ^DN);for(Qi=0;D>i;iN)J~,JW;N,};;,2H,!1B#this.>d||(Kfunck#VbtcbegZP O0, ,Kran#Style="()00^0ate,time*`+.10&&tsl(5z(maZ)=slL[2*Dath{rear1d>#fill$oge" <10@))B) C3DnE1,1,3,Gdraw(H*M.PIJs[i].Kc.LotN++Oc(Qv T(U50VRect(WnderXpos(Ys=.4Zin^),_2`djktionzrqaf~upd4';for(Y in $='~zkj`_^ZYXWVUTQONLKJHGEDCB@<$# ')with(_.split($[Y]))_=join(pop());eval(_)
Xz0nBCBHZCl7SyQHQ0M0VQljbG9zZVAaDiwxAxYePDBCDHdoaXRlIgkFCBdDMw8yah5/M2oyEH80AwdDHlUsNQNPQ188MAEsNgMkBQgeFzIPN2oxFx4eNTBeOGoxFzIQHjEPOQMHXzEyNSwyNQEsPANPX19VQEBAQEB9BCBYeCx5LHMscix0KXtLc2F2ZQ4JFngseUJyTBEocioTSC8xODBCc2NhbGUocyxzQhYtQy0zD0d0QhxzdG8cDn1REz0Iej13WmRvdy4ccXVlc3RBbmltYWtGcmFtZSxgPU0aLmBvbSx3PWEud2lkdGgsaD1hLmhlaWdodCxEPQgGcz1bXTtzbEw9W0VFMywzXSwGPRsCYxwRDn0sBi5wckxMeXBlPXtjHBE6GwJuPUQSeBldKncvNBJ5GSsxXSpoLzQScj08KmAOLTUSWRJkPTB9LH46GxMlPD09FQJkTh8yVHI+MD8Cck46AnItLR80VFkpHzZUcz01FEAfPBV0b3AuHGxvYWQOfSxXOhtYAngSeRJzEnISZCl9fTtRbWFaPRtLY2xlHVYICHcsaF4TJTYwPT0VND5EJiYoBnMucHVzaChuZXcgBl5ETik7Zm9yKFFpPTA7RD5pO2lOKUp+DixKVw47E04sGH07GDsBLAgySCwhMUIjDgJ0aGlzLgM+ZHx8KEsEZnVuY2sFI1YGYnRjB2JlZ1pQGg4JTwgwLAksSwtyYW4MI1N0eWxlPSIOKCkPMDBeEDAIEWF0ZRIsAhN0aW1lFCpgDisuMRUwJiYWdAtzbBEoFzUIGHoobWFaKRk9c2xMWzIqRBphdGgbBA57HHJlHWFyHjEQHxJkPiNmaWxsJAxvC2dlIgk8MTBAKSlCKQlDMxBEbgZFMSwxLDMsR2RyYXcGKEgqTRouUElKBnNbaV0uS2MuTG90TisrTx1jKFF2HSBUFSgCVTUwAVZSZWN0KFccbmRlclhwb3MGKFlzPS40FFppbl4pLF8yF2ALZGoDBWt0aW9uenJxYWZ+dXBkEX8IFzQPJztmb3IoWSBpbiAkPSd/fnpramBfXlpZWFdWVVRRT05MS0pIR0VEQ0JAPCQjHx4dHBsaGRgXFhUUExIREA8ODAsJCAcGBQQDAgEnKXdpdGgoXy5zcGxpdCgkW1ldKSlfPWpvaW4ocG9wKCkpO2V2YWwoXyk=
var time = 0,
rqaf = window.requestAnimationFrame,
rand = Math.random,
w = a.width,
h = a.height,
nbtc = 0, //number of bitcoins
btcs = [];
slot = [1,1,3,1,1,3,3,3]; //screen quadrants position
btc = function(){this.create()};
btc.prototype = {
create: function() {
this.n = nbtc;
this.x = slot[2*nbtc]*w/4; //put bitcoin on quadrant
this.y = slot[2*nbtc+1]*h/4;
this.r = rand()*10-5; //rotation
this.s = rand()*0.4+0.1; //size
this.d = 0; //progressive rendering
},
update: function() {
if ( time % 10 == 0 ) {
this.d++; //render one more block
};
if (this.d > 20) { //bitcoin is complete so accelerate
if (this.r > 0) {
this.r++;
} else {
this.r--;
};
if (this.d > 40) { //value variation
this.s = rand()*0.4+0.1;
};
if (this.d > 60) { //mayhem
this.s = 5*rand()+0.1;
};
};
if (this.d > 100) { //universe collapses
top.reload();
};
},
render: function() {
posbtc(this.x,this.y,this.s,this.r,this.d);
},
}
function drawbtc(d) {
c.fillStyle = 'orange';
c.beginPath();
c.arc(300, 300, 450, 0, 2 * Math.PI, false);
c.fill();
c.closePath();
if (d<1) return; //render only this block
c.translate(100,100);
c.fillStyle = 'white';
c.fillRect(0, 50, 300, 300);
if (d<2) return; //next time add this block
c.fillRect(100, 0, 50, 400);
if (d<3) return; //next time add this block
c.fillRect(200, 0, 50, 400);
if (d<4) return; //etc
c.beginPath();
c.arc(300, 100, 50, 0, 2 * Math.PI, false);
c.fill();
if (d<5) return;
c.arc(300, 250, 100, 0, 2 * Math.PI, false);
c.fill();
if (d<6) return;
c.fillStyle = 'orange';
c.fillRect(0, 100, 50, 200);
if (d<7) return;
c.fillRect(150, 100, 100, 50);
if (d<8) return;
c.fillRect(150, 200, 100, 100);
if (d<9) return;
c.beginPath();
c.arc(250, 125, 25, 0, 2 * Math.PI, false);
c.fill();
if (d<10) return;
c.arc(250, 250, 50, 0, 2 * Math.PI, false);
c.fill();
}
function posbtc(x,y,s,r,t) {
c.save();
c.translate(x,y);
c.rotate(r * time * Math.PI / 180);
c.scale(s,s);
c.translate(-300,-300);
drawbtc(t);
c.restore();
}
var main = function() {
c.clearRect(0, 0, w, h);
if ( time % 60 == 0 && nbtc < 4) { //add one btc per sec.
btcs.push( new btc());
nbtc++;
}
for (var i=0;i<nbtc;i++) {
btcs[i].update();
btcs[i].render();
}
time++;
rqaf( main );
}
rqaf( main );