Watch the demo at bl.ocks.org.
Source and comments on gist.github.com.
Watch the demo at bl.ocks.org.
Source and comments on gist.github.com.
<body id=p onload=setInterval('z=p.innerText=Array(i=i*2%99).join(" ")+"*\\n"+z',i=z=80)> |
PS: When using SVG.onload
it will give access to all it's properties:
<svg onload=console.log(outerHTML)>
Maybe we can use that here?
Using p.innerText
and custom x
tag makes ist 91 bytes:
<x id=p><svg onload=setInterval('z=p.innerText=Array(i=i*2%99).join(" ")+"*\\n"+z',i=z=80)>
Looks like good ol' <body id=p onload=
could save 2 bytes
Right! (o_#)
– now 90 bytes!
Thought about that but then the snow would not fall straight down as several spans of NBSPs could fit on the width of the window. :\
If you're all cool with this effect only working properly in a narrow viewport, then I believe we can replace the \n by a \t or even U+0009 character which saves 1 to 2 extra bytes
Using
Array((i*=2)%79)
instead ofArray(Math.random()*80|0)
will save some 8 bytes: