_='M=MaQ)C=cos,S=s,R=random,N=m;d=18g=h=k=0 l=0;bbackgroundColor="#002";setInterval({E=(D=wdow)BW-G,F=DBH-G;cw=Eh=F.w4*E;c.h4*F;gx-g`Ehy-h`F_H[I]=x,y,$,1_JbXn(kk_xzC($_yzS($l+6*Z-.3;$l-$)},G=23 n(eUaUbegPaQ(1(I+^)%b],a[1==f?"mov~:"l~]194";leW=Ymax(.5,3-c*2}fof=0^]^H3>c(O]=0==I?xyac+1):(q=O-1]).x+Cy+S,q.c d*=ge*98JbX n(p)I=I%N(b+1X)} eU0K;)a^],G==f1<c(save( translate scale(s=Ypow(N(f/G,1 2)V3+)/c,sLf"+Yceil(G+GV0)).toStrg(16LText("\\u273f",0 restore Hp)} e,f,t,mUreturn{x:e,y:f,H:!m||Z<@5/m?Array(d):null,b:I:c:m,a:tX:(@+.04*Z)V.5>Z?1:-1 g:.99+@*R( e:5/m,f:0}}p.functione.k.K-1;(q.)*e,q.);+03V ),.stylYabs(x)%1idQfovar f=(x-gy-hin0,eightwiQ(,Style="#()+++"px";cstroke)p=H[j(=.r(&&$a@.02B.nerJb=N(K;f<bL fillOH[IQthU){V*(X,dYM.ZR^f_`-.2*z+=3*~eTo"a+d';for(Y in $='~z`_^ZYXVUQOLKJB@$ ')with(_.split($[Y]))_=join(pop());eval(_)
/**
*
* Unoptimised source (2770 bytes)
*
*/
with (M = Math)C=cos,S=sin,R=random,N=min;
var childCount = 180; //180 !!
var camera = {x:0, y:0};
var root = point(0, 0, 0, 0);
var angle = 0;
root.children = Array(childCount);
(B=b.style).backgroundColor = "#002";
B.overflow = "hidden";
setInterval(function() {
c.style.width = (E = (D=window).innerWidth) + "px"
c.style.height = (F = D.innerHeight) + "px";
c.width = E * .4; //600;
c.height = F * .4; // 450
camera.x += (root.x - camera.x - E * .2) * .03;
camera.y += (root.y - camera.y - F * .2) * .03;
root.children[root.index] = point(root.x, root.y, root.angle, 1);
root.childCount = N(++root.childCount, childCount);
a.shadowOffsetX = a.shadowOffsetY = 0, a.shadowBlur = 20;
process(root);
flowers(root);
root.x += C(root.angle) * 3;
root.y += S(root.angle) * 3;
angle += R() * .6 - .3;
root.angle += (angle - root.angle) * .03;
}, 20);
function process(node)
{
with (a){
shadowColor="#142";
beginPath();
for (var i = 1; i < node.childCount - 1; i++)
{
p = node.children[(node.index + i) % node.childCount];
//a[i == 1 ? 'moveTo' : 'lineTo'](p.x - camera.x, p.y - camera.y);
a[i == 1 ? 'moveTo' : 'lineTo'](p.x - camera.x, p.y - camera.y);
}
strokeStyle = "#094";
lineCap = "round";
lineWidth = M.max(.5, 3 - node.level * 2);
stroke();
fillStyle = "#fff";
}
for (var i = 0; i < node.childCount - 1;)
{
p = node.children[i++];
p.age++;
if (p.children && node.level < 3)
{
p.children[p.index] =
p.index == 0
? point(p.x, p.y, p.angle, p.level + 1)
: point(
(q = p.children[p.index - 1]).x + C(q.angle + p.angleDelta) * p.dist,
q.y + S(q.angle + p.angleDelta) * p.dist,
q.angle + p.angleDelta,
q.level);
p.angleDelta *= p.bend
p.dist *= .98
p.childCount = N(++p.childCount, childCount);
process(p);
}
}
node.index = ++node.index % N(node.childCount + 1, 200);
}
function flowers(node)
{
a.shadowColor="#333";
for (var i = 0; i < node.childCount; i) with (a)
{
p = node.children[i++];
fontSize = (30 + i % 20) / node.level
font = fontSize + "px sans";
if (i == 20 && p.level > 1)
{
save();
translate(p.x - camera.x, p.y - camera.y);
rotate(node.x);
scale(s = M.pow(N(p.age / 20, 1), 2), s);
translate(-fontSize * .3, -fontSize * .3);
fillStyle = "#f" + ((M.abs(M.round(node.x * 10)) % 5) * 53).toString(16);
fillText("\u273f", 0, 0);
restore();
}
if (p.children)
flowers(p);
}
}
function point(x, y, angle, level)
{
return {
x: x,
y: y,
children: R() < 0.025 / level ? Array(childCount) : null,
childCount: 0,
index: 0,
level: level,
angle: angle,
angleDelta: (.02 + R() * .04) * (R() < 0.5 ? 1 : -1),
bend: 0.99 + R() * 0.02,
dist: 5 / level,
age: 0
};
}
/* ------------------------------------------------------------------ */
/**
*
* Run through Closure compiler, many details removed/modified, hand-optimised (1159 bytes minified)
*
*/
/*
with(M = Math) {
C = cos, S = sin, R = random, N = min
}
d = 180, g = 0, h = 0, k = j(0, 0, 0, 0), l = 0;
b.style.backgroundColor = "#002";
setInterval(function() {
E = (D = window).innerWidth-G, F = D.innerHeight-G
c.style.width = E + "px";
c.style.height = F + "px";
c.width = .4 * E;
c.height = .4 * F;
g += .03 * (k.x - g - .2 * E);
h += .03 * (k.y - h - .2 * F);
k.H[k.I] = j(k.x, k.y, k.a, 1);
k.b = N(++k.b, d);
n(k);
r(k);
k.x += 3 * C(k.a);
k.y += 3 * S(k.a);
l += .6 * R() - .3;
k.a += .03 * (l - k.a)
}, G=23);
function n(e) {
with(a) {
beginPath();
for(var f = 1;f < e.b - 1;) {
p = e.H[(e.I + f++) % e.b], a[1 == f ? "moveTo" : "lineTo"](p.x - g, p.y - h)
}
strokeStyle = "#094";
lineWidth = M.max(.5,3-e.c*2)
stroke();
}
for(f = 0;f < e.b - 1;) {
p = e.H[f++], p.f++, p.H && 3 > e.c && (p.H[p.I] = 0 == p.I ? j(p.x, p.y, p.a, p.c + 1) : j((q = p.H[p.I - 1]).x + C(q.a + p.d) * p.e, q.y + S(q.a + p.d) * p.e, q.a + p.d, q.c), p.d *= p.g, p.e *= .98, p.b = N(++p.b, d), n(p))
}
e.I = ++e.I % N(e.b + 1, d)
}
function r(e) {
for(var f = 0;f < e.b;) {
with(a) {
p = e.H[f++], G == f && 1 < p.c && (save(), translate(p.x - g, p.y - h), scale(s = M.pow(N(p.f / G, 1), 2) * (3+M.abs(e.x)%1) / e.c, s), fillStyle = "#f" + M.ceil(G + G * (M.abs(e.x) % 10)).toString(16), fillText("\u273f", 0, 0), restore()), p.H && r(p)
}
}
}
function j(e, f, t, m) {
return{x:e, y:f, H:!m||R() < .025 / m ? Array(d) : null, b:0, I:0, c:m, a:t, d:(.02 + .04 * R()) * (.5 > R() ? 1 : -1), g:.99 + .02 * R(), e:5 / m, f:0}
}
*/
/* ------------------------------------------------------------------ */
/**
*
* Minified and JSCrushed (1020 bytes)
*
*/
/*
_='M=MaQ)C=cos,S=s,R=random,N=m;d=18g=h=k=0 l=0;bbackgroundColor="#002";setInterval({E=(D=wdow)BW-G,F=DBH-G;cw=Eh=F.w4*E;c.h4*F;gx-g`Ehy-h`F_H[I]=x,y,$,1_JbXn(kk_xzC($_yzS($l+6*Z-.3;$l-$)},G=23 n(eUaUbegPaQ(1(I+^)%b],a[1==f?"mov~:"l~]194";leW=Ymax(.5,3-c*2}fof=0^]^H3>c(O]=0==I?xyac+1):(q=O-1]).x+Cy+S,q.c d*=ge*98JbX n(p)I=I%N(b+1X)} eU0K;)a^],G==f1<c(save( translate scale(s=Ypow(N(f/G,1 2)V3+)/c,sLf"+Yceil(G+GV0)).toStrg(16LText("\\u273f",0 restore Hp)} e,f,t,mUreturn{x:e,y:f,H:!m||Z<@5/m?Array(d):null,b:I:c:m,a:tX:(@+.04*Z)V.5>Z?1:-1 g:.99+@*R( e:5/m,f:0}}p.functione.k.K-1;(q.)*e,q.);+03V ),.stylYabs(x)%1idQfovar f=(x-gy-hin0,eightwiQ(,Style="#()+++"px";cstroke)p=H[j(=.r(&&$a@.02B.nerJb=N(K;f<bL fillOH[IQthU){V*(X,dYM.ZR^f_`-.2*z+=3*~eTo"a+d';for(Y in $='~z`_^ZYXVUQOLKJB@$ ')with(_.split($[Y]))_=join(pop());eval(_)
*/