for(_='"#zzffjthQa.widQOO/390,$$25q2*IpineV[i]U0;i--;)Ki=50KJzf00"A,P@D+50@`t(__0@,O,^6,6,C?ZstrokeYshadowXStyle=Ht,o,l,eGj0"Fjf"E255 ,1,16fillfunction(a.height,z666"10_D@,$-D@-p-3,,,arc(),beginPaQ(,$2*MaQ.PIfor(z000"M@-Rec_0*i,D<O&&D>-0L[(~~M+i*R)%500]?lVTo(moveTo( Y(,lVWidQ=MaQ.random()* `+I/4`-p0+5,7XBlur=,setLVDash(HXColor=YHP=7/8*B=C=$N=[],L=[],JNU=P/2,LU=5*(>7);wiQ(m=a.cloneNode(n=m.getContex_"2d")){z057",$$O@3$E,i=25KO,P,5,5);F,5$5q()}wiQ(c)t=G,i){i,G)},setInterval(){C=--B%30?C:!C,drawImage(m,$0)$Jif($I=NU,D=B/4+5e4-&&(p,FL.slice(-i)[,5]3$_ZA:E_0+-ZE:A0D=B/2+)I,zaaa"R=3;R--;)M=P-I/4;M>=P-I;M-=30):$_D+30*R+,M,2$2$F:);$^z060"^5,E_9+245@-3$F3[3,15] B@+5O@+5_0@-15,9+ ,,M=9;M>- ;M-= )$_8q$67,z57a"_4q$3,E70[$55] 45 +45F3$[3$6,6$6] 60 +60$,361720()},50)';g=/[- E-HX-Z^-`@AJKUVpq$9OQjz]/.exec(_);)with(_.split(g))_=join(shift());eval(_)
_=7/8*a.height
$ = J = 0 //counter
Z = []
L = []
for (i = 500; i--;) {
Z[i] = (Math.random() * _ / 2)
L[i] = (Math.random() * 10 > 7)*5
}
m = a.cloneNode()
n = m.getContext("2d")
with(n) {
//background
fillStyle = shadowColor = strokeStyle = "#057"
fillRect(0, 0, a.width, _)
shadowBlur = 30
fillStyle = shadowColor = strokeStyle = "#fff"
for (i = 250; i--;)
fillRect(Math.random()*a.width, Math.random()*_, 5, 5)
fillStyle = shadowColor = strokeStyle = "#ff0"
arc(50,50,25,0,2*Math.PI)
fill()
}
with(c) {
t = function(X, Y, W, H, C) {
fillStyle = shadowColor = strokeStyle = C
fillRect(X, Y, W, H)
}
//font = "30px Arial"
setInterval(function() {
J=--$%30?J:!J
drawImage(m, 0, 0)
//buildings
lineWidth = 100
for (i = 500; i--;) {
shadowBlur = 0
K=Z[i]
D=$ / 4 + 5e4 - i*100
if (D < a.width && D > -100) {
t(D, _, 100, -2*K, "#000")
fillStyle = shadowColor = strokeStyle = "#ff0"
beginPath()
setLineDash(L.slice(-i))
moveTo(D + 50, _ + K/4)
lineTo(D + 50, _ - K*2)
stroke()
fillStyle = shadowColor = strokeStyle = "#666"
beginPath()
setLineDash([10, 5])
moveTo(D + 50, _ + K/4)
lineTo(D + 50, _ - K*2)
stroke()
shadowBlur = 30
t(D, _ - K*2 - 3, 6, 6, J? "#f00" : "#fff")
t(100+D, _ - K*2-3, -6, 6, !J? "#f00" : "#fff")
shadowBlur = 0
}
D=$ / 2 + i*100
if (D < a.width && D > -100) {
t(D, _, 100, -K, "#aaa")
for (j = 3; j--;) {
for (X = _ - K/4; X >= _ - K; X -= 30) {
shadowBlur = L[(~~X + i * j) % 500] ? 10 : 0
t(D + j * 30 + 10, X, 20, 20,L[(~~X + i * j) % 500] ? "#ff0" : "#666")
}
}
}
}
shadowBlur = 0
//трава
t(0, _, a.width, a.height, "#060")
//рельсы
t(0, _, a.width, 5, "#fff")
t(a.width / 3 + 245, _ - 30, 10, 10, "#ff0")
//шпалы
fillStyle = shadowColor = strokeStyle ="#000"
lineWidth = 3
beginPath()
setLineDash([3,15])
moveTo($, _+5)
lineTo(a.width, _+5)
stroke()
//поезд
t(0, _ - 15, a.width / 3 + 255, 10, "#000")
for (X = a.width / 3; X > -255; X -= 255) {
shadowBlur = 0
//кузов
t(X, _ - 80, 250, 67, "#57a")
//полоса
t(X, _ - 40, 250, 3, "#fff")
//загогулины
//fillText("><", X + 55, _ - 15)
//fillText("><", X + 161, _ - 15)
//двери
fillStyle = shadowColor = strokeStyle ="#000"
lineWidth = 70
beginPath()
setLineDash([0, 55, 1, 16, 1, 16, 1, 16])
moveTo(X, _ - 45)
lineTo(255 + X, _ - 45)
stroke()
//окна
fillStyle = shadowColor = strokeStyle ="#ff0"
lineWidth = 30
shadowBlur = 10
beginPath()
setLineDash([10, 10, 30, 10, 10, 6, 10, 10, 60, 10, 10, 6])
moveTo(X, _ - 60)
lineTo(255+X, _ - 60)
stroke()
//колеса
shadowBlur = 0
beginPath()
fillStyle = shadowColor = strokeStyle ="#666"
arc(30+X,_-5,7,0,2*Math.PI)
arc(60+X,_-5,7,0,2*Math.PI)
arc(170+X,_-5,7,0,2*Math.PI)
arc(200+X,_-5,7,0,2*Math.PI)
fill()
}
}, 50)
}