Christmas themed demo with a tree, text, snow, and three red and green demo effects. Fire goes kinda slow in firefox but works well in chrome, opera and safari.
with(a){for(Y in a)a[Y[0]+(Y[6]||Y[2])]=a[Y];S=c.width=c.height=784;M=Math;s=M.sin;r=M.random;w=[];u=[];q=[];m=[];strokeStyle="#fff";lineWidth=5;F="fillStyle";for(i=A=C=k=0;i<S;i++){w[i]=r()*S;u[i]=r()*S;m[i]=r()}e="Merry Christmas!";(U=setInterval)(function(){A++},S*(n=16));U(function(){a[F]=sS;fc(0,0,S,S);C+=0.1;if(A%=4)for(y=0;y<f;y++)for(x=0;x<f;x++){q[y+(f-1)*f]=r()*o;if(A==3){q[x+y*f]=(q[x-1+(y+1)*f]+q[x+(y+2)%f*f]+q[x+1+(y+1)*f]+q[x+(y+3)%f*f])*64/o|0;a[F]=L+((K+K*s(6-C))*q[x+y*f]|0)+X+((K+ K*s(C))*q[x+y*f]|0)+O}else a[F]=L+(A==2?(h=p+p*s(M.sqrt(($=x-25)*$+(I=y-25)*I)+C)|0)+X+(o-h):(H=(p=128)+p*(s(x/(Q=7+5*s(C))+C)+s(y/Q+C))|0)+X+(o-H))+O;fc(x*n,y*n,n,n)}else{for(i=n;i>0;i--){a[F]="#30f";ba();mv((Q=S/2)-f-i*n,f+i*f);ln(Q,i*35);ln(Q+f+i*n,f+i*f);fl();sr()}for(;i<S;i++){w[i]+=r()-(K=0.5);u[i]+=r();a[F]="rgba("+(o=256)+(X=",")+o+X+o+X+m[i]+")";fc(w[i]%S,u[i]%S,j=m[i]*3,j)}for(i=0;i<n;i++){k=k?0:o;font=f+f*s((n-i+C*2)/2)+"px Impact";a[F]=(L="rgb(")+k+X+(o-k)+(O=",0)");fx(e[i],i*f,f*s(C+ i)+Q)}}},f=50)};
d2l0aChhKXtmb3IoWSBpbiBhKWFbWVswXSsoWVs2XXx8WVsyXSldPWFbWV07Uz1jLndpZHRoPWMuaGVpZ2h0PTc4NDtNPU1hdGg7cz1NLnNpbjtyPU0ucmFuZG9tO3c9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6bztmb250PWYrZipzKChuLWkrQyoyKS8yKSsicHggSW1wYWN0IjthW0ZdPShMPSJyZ2IoIikraytYKyhvLWspKyhPPSIsMCkiKTtmeChlW2ldLGkqZixmKnMoQysgaSkrUSl9fX0sZj01MCl9Ow==
with (a) {
for (Y in a) a[Y[0] + (Y[6] || Y[2])] = a[Y]; //abbreviation loop
S = c.width = c.height = 784;
M = Math; s = M.sin; r = M.random;
w = []; u = []; q = []; m = []; //snow x pos; snow y pos; fire; snow brightness/size
strokeStyle = "#fff";
lineWidth = 5;
F = 'fillStyle';
for (i = A = C = k = 0; i < S; i++) { //784 stars
w[i] = r() * S; //randomize x
u[i] = r() * S; //randomize y
m[i] = r(); //randomize brightness/size
}
e = 'Merry Christmas!';
(U = setInterval)(function () { //for changing the scene
A++;
}, S * (n = 16)) //about 12 secs
U(function () {
a[F] = sS; //sS == '#000000' (don't know what it's for but it's useful)
fc(0, 0, S, S); //set it all black
C += .1; //time variable
if (A %= 4) {
for (y = 0; y < f; y++)
for (x = 0; x < f; x++) {
q[y + (f - 1) * f] = r() * o;
if (A == 3) {
q[x + y * f] = //do fire calcs
((q[(x - 1) + (y + 1) * f]
+ q[x + (y + 2) % f * f]
+ q[x + 1 + (y + 1) * f]
+ q[x + (y + 3) % f * f])
* 64) / o | 0;
a[F] = L + ((K + K * s(6 - C)) * q[x + y * f] | 0) + X + ((K + K * s(C)) * q[x + y * f] | 0) + O; //set color to fire with alternation between green and red
} else
a[F] = L + (A == 2 ? // color = rgb( + plasma or circles + ,0)
(h = p + p * s(M.sqrt(($ = x - 25) * $ + (I = y - 25) * I) + C) | 0) + X + (o - h) :
(H = (p = 128) + p * (s(x / (Q = 7 + 5 * s(C)) + C) + s(y / Q + C)) | 0) + X + (o - H)) + O;
fc(x * n, y * n, n, n); //draw the (very large) pixels
}
}
else {
for (i = n; i > 0; i--) {
a[F] = "#30f"; //tree color
ba(); //begin path
mv((Q = S / 2) - f - i * n, f + i * f); //move to start
ln(Q, i * 35); //line to top of triangle
ln(Q + f + i * n, f + i * f); //line to far right point of triangle
fl(); //fill
sr(); //stroke (for the white "snow" on branches)
}
for (; i < S; i++) { //dont need to init i because its still 0 from the last loop
w[i] += r() - (K = .5); //add random x between -0.5 and 0.5
u[i] += r(); //add random y between 0 and 1
a[F] = 'rgba(' + (o = 256) + (X = ',') + o + X + o + X + m[i] + ')'; //set color to rgba(255,255,255, + snow brightness
fc(w[i] % S, u[i] % S, j = m[i] * 3, j); //draw the snow particle
}
for (i = 0; i < n; i++) {
k = k ? 0 : o; //if k = 0, k = 256; if k = 256, k = 0
font = f + f * s((n - i + C * 2) / 2) + 'px Impact'; //set font size
a[F] = (L = 'rgb(') + k + X + (o - k) + (O = ',0)'); //color (red = k; green = 256 - k) alternates between red and green
fx(e[i], i * f, f * s(C + i) + Q); //fill text
}
}
}, f = 50); //20 fps (and set f while we're here
}