Live data from Hacker News

Realistic rain drops in JS

maroslaw.github.io

11–20 of 22 posts

Re: Realistic rain drops in JS

#11

I'm finally getting pretty comfortable with Rails, HTML, CSS, enough to actually use things like this. Can anyone recommend slick/good looking js like this that would be fun to toy with?

You can try it out my hacker news web app for mobile. http://hn.premii.com

Source code at http://github.com/premii/hn Or This is another awesome HN app. Scroll down to bottom for source code. http://hackerwebapp.com/

Re: Realistic rain drops in JS

#12
Looks great! The biggest drops sort of spoil the illusion at times because they pass in front of or behind other drops without absorbing them. Maybe a cool tweak for v2 would be to add some simple collision resolution?

It would probably look great if you did a front to back sort based on droplet size, and resolved collisions (which you'd have to detect) by deleting the smaller droplet.

Re: Realistic rain drops in JS

#15

Looks great! The biggest drops sort of spoil the illusion at times because they pass in front of or behind other drops without absorbing them. Maybe a cool tweak for v2 would be to add some simple collision resolution? It would probably look great if you did a front to back sort based on droplet size, and resolved collisions (which you'd have to detect) by deleting the smaller droplet.

Looks like they did:

http://maroslaw.github.io/rainyday.js/demo012_3.html

Re: Realistic rain drops in JS

#16
post #15

Looks great! The biggest drops sort of spoil the illusion at times because they pass in front of or behind other drops without absorbing them. Maybe a cool tweak for v2 would be to add some simple collision resolution? It would probably look great if you did a front to back sort based on droplet size, and resolved collisions (which you'd have to detect) by deleting the smaller droplet.

Looks like they did: http://maroslaw.github.io/rainyday.js/demo012_3.html

That one looks much less realistic to me. There were no long streak from drops that slid all the way down.

Re: Realistic rain drops in JS

#19
post #15

Looks great! The biggest drops sort of spoil the illusion at times because they pass in front of or behind other drops without absorbing them. Maybe a cool tweak for v2 would be to add some simple collision resolution? It would probably look great if you did a front to back sort based on droplet size, and resolved collisions (which you'd have to detect) by deleting the smaller droplet.

Looks like they did: http://maroslaw.github.io/rainyday.js/demo012_3.html

It resolves the overlap, but doesn't combine the drops into a larger single drop.

Re: Realistic rain drops in JS

#20

Looks great! The biggest drops sort of spoil the illusion at times because they pass in front of or behind other drops without absorbing them. Maybe a cool tweak for v2 would be to add some simple collision resolution? It would probably look great if you did a front to back sort based on droplet size, and resolved collisions (which you'd have to detect) by deleting the smaller droplet.

If one can solve a tridiagonal linear system in JS that is totes doable in a psuedo physical way: http://www.cse.ohio-state.edu/~whmin/Wang-2007-SGS/Wang-2007...

The Thomas algorithm (http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm) and that technique could probs make your dream come true.

Post reply on HN