Skip to content

wutility/snow-cvs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❄️ Nice snow canvas

Nice snow animation using canvas

snow animation bundlephobia badge bundlephobia badge

$ npm i snow-cvs --save

CDN

<script src="https://cdn.jsdelivr.net/npm/snow-cvs/dist/index.min.js"></script>
<!-- access via object : SnowCanvas -->

Usage

import SnowCanvas from 'snow-cvs';

Examples

const Snow = new SnowCanvas()

// Set number of flakes (optional)
// default: window.innerWidth / 6
Snow.createSnowFlakes(2);

const canvas = Snow.getCanvas(); // return HTMLCanvasElement
document.body.appendChild(canvas);

License

MIT