Small JavaScript Plugin For Canvas Based Snow Falling Effect – canvas-snow.js

Category: Animation , Javascript | December 3, 2015
Author:bjldigital
Views Total:7,049 views
Official Page:Go to website
Last Update:December 3, 2015
License:MIT

Preview:

Small JavaScript Plugin For Canvas Based Snow Falling Effect – canvas-snow.js

Description:

canvas-snow.js is a lightweight JavaScript library which will apply a snowfall animation to a specific element. Based on HTML5 canvas element and requestAnimationFrame.

How to use it:

Add the canvas-snow.js script to the webpage.

<script src="canvas-snow.js"></script>

Apply the snow falling effect to an element with an unique ID ‘container’.

var falling = new Blizzard('container');

Gives the element a fallback if canvas isn’t supported.

.falling-snow.fallback {
  width: 100%;
  height: 100%;
  background-image: url('bg-snow.png');
  background-size: 100%;
}

You Might Be Interested In:


Leave a Reply