Sprinkler.js: a rainy animation library

Sprinkler is an image rain animation library for web sites. During Christmas 2014, I wanted to write something fun, a web animation about falling snowflakes. It turned out to be a complete software package that helps you to write all kinds of animations where objects are falling. Let them be snowflakes, leaves, money, or even babies, anything goes!

There was a surprising challenge to make a particle rain look like random. One, steady rate looked too machine-like and monotonous. Two, sudden lags in web page computation, typical when navigating between browser tabs, caused tight waves of particles to appear at the same time. Fortunately, I got the algorithm working and the result was quite smooth, robust, and realistic.

See funny examples and usage instructions at github.com/axelpale/sprinkler

Leave a Comment

Your email address will not be published. Required fields are marked *