Rainyday.js:
"The idea behind rainyday.js is to create a JavaScript library that makes use of the HTML5 canvas to render an animation of raindrops falling on a glass surface. "
demo:
http://maroslaw.github.io/rainyday.js/demo012_1.html官网:
http://maroslaw.github.io/rainyday.js/How to use:
var engine = new RainyDay({
element: 'background', // ID of image element
blur: 10, // Defines blur due to rain effect
opacity: 1, // Opacity of rain drops
fps: 30 // Frame rate per second
});
engine.rain([ [3, 3, 0.88], [5, 5, 0.9], [6, 2, 1] ], 100);