Re:CSS Raindrops on a Window
by adamwong246 on Tuesday November 26, 2013 @07:48PM
(#6805443)
Cool. Sounds really hard though. To look realistic, the drops would have to merge into one another and also follow down previously established paths. It's pretty cool that you did this in just css but I think we have veered into WebGl territory.
Re:CSS Raindrops on a Window
by lbebber on Tuesday November 26, 2013 @08:01PM
(#6805499)
Well that is impressive.
However I don't know if there's a way to check for collisions that don't include the mouse pointer in CSS. (and I would like that if one drop falls over another they both merge)
Re:CSS Raindrops on a Window
by Angostura on Wednesday November 27, 2013 @06:57AM
(#6807605)
Enthusiastic noob here. I can usually fathom what is going in these neat CSS demos, but this one baffles me. Could someone provide a few pointers as to how it's doing what it does?
Re:CSS Raindrops on a Window
by lbebber on Wednesday November 27, 2013 @10:06AM
(#6808357)
Hey, I made this thing.
Each rain drop takes an image, scales it down, rotates it 180ΒΊ, positions it according to the drop's position and crops in a round shape. Then a small border is added according to the drop's size. The trick is getting all those values right.
Re:CSS Raindrops on a Window
by Angostura on Wednesday November 27, 2013 @11:29AM
(#6809022)
Many thanks for answering. Much appreciated. Conceptually, I understand each of those steps. I'm much less clear on how the drop appears to refract the underlying image.
http://codepen.io/i0z/pen/mFLCw
[1] https://news.ycombinator.com/item?id=6780008
[0]: http://www.rainymood.com/
If two drops touch they become a large drop.
Drops over a certain size run down the window and consume any drops they touch.
Drops "dry" through decay at a set rate.
Each rain drop takes an image, scales it down, rotates it 180ΒΊ, positions it according to the drop's position and crops in a round shape. Then a small border is added according to the drop's size. The trick is getting all those values right.
FF 25.0.1 on Ubuntu 13.10