for(_=',c.q),@qba(@c.BBarc(Z(PH99RH+6R)NE(!].Fz+D0,V4VUqfillKUV9)K(J9,T)+"ks[jjzF$$W#qfc(`,$y_jD1Fy^`V^,C_-^.3*($y-^-1FYM.sinH/RRi=0;i++<R;)x=0;x++<A;).8/$z*1.7)*(C/21Rfor(+M.cosH/RRa.height@G.addColorStop(%,"+!"hsl(($x-#+#/M.random()/2@+9+2*#_) s.lengthKStyle=)V0function(z,X,r){c.globalAlpha=k%)"--)qlA in c)c[A[0]+[A[6]]]=c[A];s=[],O=P=VM=Math,C=a.width,E=return D(X-z)*r},Q=$z=*z-H-(b>z?*:0)@$x=+-X*_=-(jz-(Y+R9))*|V#=*},A=R*,y=2e4*-1e4,d=?j:Vj]={Y:!d,d+y,x/(3*A)@c:!VA-48,x/A@s:};setInterval(P+=UP%=*,T=(-1.7)+1)/2,G=c.cL(,-,V,78U1,1U408V)G`VVC,)"+!Uk,R%,52%)"Z,JU9Z++@J@A=,z=N/|VO-=.01*$c,T`(jxFs*C+O)%C,x,1,1);1,b=P/|VY=!jz,$Y,N%/@x=VX=-(jbFc*H%)/@z=b+i,Q(z,-x@Q(D1,-x-X@x+=X,X+=$c,$z>.8&&^<A&&^<$y&&(A=$y"+(z%3?72:82)+",47UU`$x-1.5*#_-@3*#,)2VBm-9_)9_@D+9_)-9_@z--qm- ,D+ - K(@z--,i/RG@1)},16)';g=/[-^-`#$jkJKUVDF!NRHZB@q]/.exec(_);)with(_.split(g))_=join(shift());eval(_)
for ( A in c ) { // hash all the methods
c[A[0] + [A[6]]] = c[A]
}
s = [] // segments
O = P = 0 // position
M = Math
C = a.width
E = function( z, X, r ) {
return z + (X - z) * r
}
Q = function( z, X, r ) {
s[z].z = z * 199 - (P - (z < b ? s.length * 199 : 0))
s[z].x = C/2 + ((.8 / s[z].z) * -X * C/2)
s[z].y = (a.height/2 - ((.8 / s[z].z) * (s[z-1].Y - (Y + 999)) * a.height/2)) | 0
s[z].W = (.8 / s[z].z) * 199 * C/2
}
for ( i = 0; i++ < 99; ) {
A = M.random() * 99
y = M.random() * 2e4 - 1e4
d = s.length ? s[s.length-1].Y : 0
for ( x = 0; x++ < A; ) {
s[s.length] = {
Y: E( d, d + y, x / (A * 3) ),
c: E( 0, A - 48, x / A ),
s: M.random()
}
}
}
setInterval(function( z, X, r ) {
// update
P += 40
P %= s.length * 199
T = (M.sin( P/9999-1.7 ) + 1) / 2
// bg
G = c.cL( C/2, -a.height/2, C/2 + M.cos( P/9999-1.7 ) * (C/2), a.height/2 + M.sin( P/9999-1.7 ) * (a.height/2) )
G.addColorStop( 0, 'hsl(199,78%,'+ E(40, 9, T) +'%)' )
G.addColorStop( 1, 'hsl(140,40%,'+ E(80, 9, T) +'%)' )
c.fillStyle = G
c.fc( 0, 0, C, a.height )
// sun
c.fillStyle = 'hsl('+ E( 40, 9, T ) +',99%,52%)'
c.ba()
c.arc( C / 2 + M.cos( P/9999-1.7 ) * (C / 2), a.height / 2 + M.sin( P/9999-1.7 ) * (a.height / 2), 40, 0, 9 )
c.fill()
// moon
c.fillStyle = 'hsl(0,0%,'+ E( 40, 99, T ) +'%)'
c.ba()
c.arc( C / 2 + M.cos( P/9999+1.7 ) * (C / 2), a.height / 2 + M.sin( P/9999+1.7 ) * (a.height / 2), 40, 0, 9 )
c.fill()
A = a.height
z = ( (P + 699) / 199 ) | 0
// stars
for ( O -= s[z].c * .01, x = 0; x++ < A; ) {
c.globalAlpha = T
c.fc( (s[x].s * C + O) % C, x, 1, 1 )
}
c.globalAlpha = 1
b = ( P / 199 ) | 0 // baseSegment
Y = E( s[z-1].Y, s[z].Y, ((P + 699) % 199) / 199 )
x = 0
X = -(s[b].c * (P % 199) / 199)
for ( i = 0; i++ < 99; ) {
z = b + i
Q( z, -x )
Q( z+1, -x - X )
x += X
X += s[z].c
if ( s[z].z > .8 && s[z+1].y < A && s[z+1].y < s[z].y ) {
A = s[z].y
// grass
c.fillStyle = 'hsl('+ (z % 3 ? 72 : 82) +',47%,'+ E(40, 9, T) +'%)'
c.fc( 0, s[z+1].y, C, s[z].y - s[z+1].y )
// wood
c.fillStyle = 'hsl(0,0%,'+ E(40, 9, T) +'%)'
c.fc( s[z].x - s[z].W * 1.5, s[z].y - (s[z].y - s[z+1].y) * .3, s[z].W * 3, (s[z].y - s[z+1].y) * .3 )
// tracks
c.fillStyle = 'hsl(0,0%,'+ E(20, 9, T) +'%)'
c.ba()
c.m( s[z].x - s[z].W + s[z].W / -9, s[z].y )
c.l( s[z].x - s[z].W + s[z].W / 9, s[z].y )
z++
c.l( s[z].x - s[z].W + s[z].W / 9, s[z].y )
c.l( s[z].x - s[z].W + s[z].W / -9, s[z].y )
z--
c.m( s[z].x - s[z].W + s[z].W / -9 + s[z].W * 2, s[z].y )
c.l( s[z].x - s[z].W + s[z].W / 9 + s[z].W * 2, s[z].y )
z++
c.l( s[z].x - s[z].W + s[z].W / 9 + s[z].W * 2, s[z].y )
c.l( s[z].x - s[z].W + s[z].W / -9 + s[z].W * 2, s[z].y )
c.fill()
// fog
z--
c.globalAlpha = i / 99
c.fillStyle = G
c.fc( 0, s[z+1].y, C, s[z].y - s[z+1].y )
c.globalAlpha = 1
}
}
}, 16)