Skip to main content

Rainyday.js gives your browser a pleasant shower

It's a lovely day out in the world beyond the Creative Bloq office right now, and there's not much worse than being stuck inside when it's nice out, right? We'd much rather have rain hammering against the windows – hopefully easing off a bit when it's time to go home.

If you feel the same, there's an excellent browser-based way to simulate looking through a window on a rainy day and watching those raindrops trickle down the glass. It's called rainyday.js, by Marek Brodziak, and it's a smart piece of JavaScript that'll run in most decent browsers and render impressive raindrops - using HTML5's canvas feature - even on a fairly slow computer.

You can see some basic demos here but it's already been adapted into something a little more impressive; take a look at Raining.fm, where they've taken the basic script and added adjustable sound effects. Lovely!

You're welcome to use rainyday.js for your own web projects, too; just grab the source from GitHub and get to work. And if you're interested in how it all works, there's a great article by Marek on how he created rainyday.js here.

Words: Jim McCauley

Liked this? Read these!

Made something amazing with JavaScript? Tell us in the comments!

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began over a decade ago. The current website team consists of five people: Editor Kerrie Hughes, Deputy Editor Rosie Hilder, Deals Editor Beren Neale, Senior News Editor Daniel Piper, Digital Arts and Design Editor Ian Dean, and Staff Writer Amelia Bamsey. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.