Rainyday.js
github.com
github.com
The rain drops are too spherical as they traverse the screen. The friction plus surface tension of a water on glass pulls the tail out significantly farther then represented and also varies on whether the drop is following a path that's already been traversed and therefore has less friction. It would be really really cool to see that effect added in.
Each 'drop' of rain is really a circle painted using the reflection scaled to the size of the drop. This approach is very fast, but won't scale well with odd-shaped drops and larger drops. With a small enough spherical drop, it's a good enough approximation for refraction.
With larger drops, you'd start to notice that the reflection isn't a refraction (i.e. the reflection is cutout in the shape of a circle, rather than truly refracted as in a drop of water).
Other approaches could be adding more expensive texture transforms, or WebGL + a refraction shader for bigger and/or non-spherical drops.
Overall a wonderful demo.
The interesting takeaway for me was that making something look rainy has so little to do with actual rain drops, and everything to do with the secondary effects of bad weather.
I thought that was a very nice touch, since it would be easy to skip that.
demo 1: http://jsbin.com/UFudExe/1
demo 2: http://jsbin.com/ePidOJe/2
Looks like they even have apps for portable rain now.
The blobs merged together seamlessly when they even came close to eachother and were a pretty close impression of real liquid drops.
This technique might also work to make the merging of the blobs appear more realistic.
There are a few small issues:
* There is a lot of flickering of the raindrops
* When two raindrops collide, they do not always merge correctly - sometimes the size is wrong, or the position is wrong
This would make a great ambient bg for one of the nighttime podcasts like sleepbot.
https://rawgithub.com/maroslaw/rainyday.js/v0.1.1/rainyday.j...
demo 1: http://jsbin.com/UFudExe/1
demo 2: http://jsbin.com/ePidOJe/2
> Use this for testing and for sharing demo code with friends, but don't use it for anything production-related. It's slow, it might break from time to time, and it's intended as a convenience for development, not free static hosting.
Rawgithub is nice to test something out on but probably not going to hold out against HN traffic. I did get it working with a different link you posted and it looks very cool.
I use Chrome on Linux Mint.
Here's a version with the code pasted straight in:
demo 1: http://jsbin.com/UFudExe/1
demo 2: http://jsbin.com/ePidOJe/2
There's no point in making web stuff if you can't support major browsers..
EDIT: I take it back. mdkess is right.
https://raw.github.com/maroslaw/rainyday.js/v0.1.1/rainyday....
Note the dot after the raw