A simple JS script for simulating 2D snow using the Canvas API.
Simply add the script to your HTML:
<script src="https://cdn.jsdelivr.net/gh/hawkgs/snow@main/scripts/snow.min.js"></script>
Then you can use the global Snow
object in your code:
Snow.attachToElement(el, {
width: el.clientWidth,
height: el.clientHeight,
});
For more configuration options check snow.js config.