A forest scene, my first js1k! After the initial shock of fitting code into only 1024 bytes, and cutting stuff that wouldn't fit, I realized I could squeeze it even smaller at the last moment. So here…
w=700;h=250;o=0;b.style.background="#000";a.canvas.width=w;a.canvas.height=h;q=[];m=Math;g=m.random;u=m.floor;p=Math.PI*2;f=20;v=0;function k(d,c){if(d.y<c.y){return -1}return d.y>c.y}function t(c,d){a.lineTo(c,d)}function l(d){a.fillStyle=d}function z(c,B,s){this.x=c;this.y=B;var A=0;var n="rgb("+(233+u(g()*20))+","+(197+u(g()*50))+",18)";var j=Array();for(var d=0;d<15;d++){j.push(g())}this.d=function(){A=c-o;A+=A/w*B/h*999;l("#a56007");a.beginPath();t(A,B+28);t(A+25,B+35);t(A,B+32);a.fill();l("#000");a.beginPath();t(A,B);t(A+s/4,B+30);t(A,B+32);t(A-s/4,B+30);a.fill();l(n);for(var C=0;C<15;C++){var D=j[C]*s/2;var y=C/15*p;var E=A+m.cos(y)*s;var x=B+m.sin(y)*s;if(C<1){E=A;x=B;D=s}a.beginPath();a.arc(E,x,D,0,p,1);a.fill()}}}e=0;function r(){if(g()<0.3){q.push(new z(w+o+f,g()*h,g()*16+4))}q.sort(k);o++;if(e){l("#c77b1a");a.fillRect(0,0,w,h);for(i=0;i<q.length;){if(q[i].x<(o-f)){q.splice(i,1);continue}q[i++].d()}setTimeout("r()",42)}}i=0;while(i++<w+f){r()}e=1;r();
dz03MDA7aD0yNTA7bz0wO2Iuc3R5bGUuYmFja2dyb3VuZD0iIzAwMCI7YS5jYW52YXMud2lkdGg9dzthLmNhbnZhcy5oZWlnaHQ9aDtxPVtdO209TWF0aDtnPW0ucmFuZG9tO3U9bS5mbG9vcjtwPU1hdGguUEkqMjtmPTIwO3Y9MDtmdW5jdGlvbiBrKGQsYyl7aWYoZC55PGMueSl7cmV0dXJuIC0xfXJldHVybiBkLnk+Yy55fWZ1bmN0aW9uIHQoYyxkKXthLmxpbmVUbyhjLGQpfWZ1bmN0aW9uIGwoZCl7YS5maWxsU3R5bGU9ZH1mdW5jdGlvbiB6KGMsQixzKXt0aGlzLng9Yzt0aGlzLnk9Qjt2YXIgQT0wO3ZhciBuPSJyZ2IoIisoMjMzK3UoZygpKjIwKSkrIiwiKygxOTcrdShnKCkqNTApKSsiLDE4KSI7dmFyIGo9QXJyYXkoKTtmb3IodmFyIGQ9MDtkPDE1O2QrKyl7ai5wdXNoKGcoKSl9dGhpcy5kPWZ1bmN0aW9uKCl7QT1jLW87QSs9QS93KkIvaCo5OTk7bCgiI2E1NjAwNyIpO2EuYmVnaW5QYXRoKCk7dChBLEIrMjgpO3QoQSsyNSxCKzM1KTt0KEEsQiszMik7YS5maWxsKCk7bCgiIzAwMCIpO2EuYmVnaW5QYXRoKCk7dChBLEIpO3QoQStzLzQsQiszMCk7dChBLEIrMzIpO3QoQS1zLzQsQiszMCk7YS5maWxsKCk7bChuKTtmb3IodmFyIEM9MDtDPDE1O0MrKyl7dmFyIEQ9altDXSpzLzI7dmFyIHk9Qy8xNSpwO3ZhciBFPUErbS5jb3MoeSkqczt2YXIgeD1CK20uc2luKHkpKnM7aWYoQzwxKXtFPUE7eD1CO0Q9c31hLmJlZ2luUGF0aCgpO2EuYXJjKEUseCxELDAscCwxKTthLmZpbGwoKX19fWU9MDtmdW5jdGlvbiByKCl7aWYoZygpPDAuMyl7cS5wdXNoKG5ldyB6KHcrbytmLGcoKSpoLGcoKSoxNis0KSl9cS5zb3J0KGspO28rKztpZihlKXtsKCIjYzc3YjFhIik7YS5maWxsUmVjdCgwLDAsdyxoKTtmb3IoaT0wO2k8cS5sZW5ndGg7KXtpZihxW2ldLng8KG8tZikpe3Euc3BsaWNlKGksMSk7Y29udGludWV9cVtpKytdLmQoKX1zZXRUaW1lb3V0KCJyKCkiLDQyKX19aT0wO3doaWxlKGkrKzx3K2Ype3IoKX1lPTE7cigpOw==
w = 700;//b.clientWidth;//
h = 250;
o = 0;
b.style.background = "#000";
a.canvas.width = w;
a.canvas.height = h;
q = [];
m=Math;
g=m.random;
u=m.floor;
p=Math.PI*2;
f = 20;
v = 0;
function k(a, b){
if( a.y < b.y )return -1;
return a.y > b.y;
}
function t(x,y){a.lineTo(x,y)}
function l(c){a.fillStyle=c}
//function qq(n,r){return n+m.floor(g()*r);}
function z(x,y,r){
this.x=x;this.y=y;
var xx=0;
var lc = "rgb("+(233+u(g()*20))+"," + (197+u(g()*50)) + ",18)";//"#FAD934";//
//"rgb(" + qq(233,20) + "," + qq(197,50) + ",18)";//"#FAD934";//
var rands = Array();
for( var i = 0; i < 15; i++ ){rands.push( g() );}
this.d=function(){
xx=x-o;
xx+=xx/w*y/h*999;
l("#a56007");//l("#b17322");
a.beginPath();
t(xx,y+28);
t(xx+25,y+35);
t(xx,y+32);
//a.closePath();
a.fill();
l("#000");//l("#1c1513");
a.beginPath();
t(xx,y);
t(xx+r/4,y+30);
t(xx,y+32);
t(xx-r/4,y+30);
//a.closePath();
a.fill();
l(lc);//l("#fddc38");//lc;
for( var i = 0; i < 15; i++ ){
var rd = rands[i] * r / 2;
var ag = i/15 * p;
var xl = xx + m.cos(ag)*r;
var yl = y + m.sin(ag)*r;
if( i<1 ){xl = xx; yl = y; rd = r;}
a.beginPath();
a.arc( xl,yl,rd,0,p,1 );
a.fill();
}
};
}
e=0;
function r(){
if( g() < .3 ){q.push( new z(w+o+f, g() * h, g()*16+4 ));}
q.sort(k);
o++;
if(e){
l("#c77b1a");//l("#cf8b33");
a.fillRect(0,0,w,h);
for( i=0; i < q.length; ){if( q[i].x < (o-f) ){ q.splice(i,1); continue; }q[i++].d()}
setTimeout("r()",42);
}
}
i=0;
while(i++<w+f){r()}
//for(;i<w+f;i++){r()}
e=1;
r();