ht;
= () * width;
= (() * 1) - 0.5;
= (() * 0.5) + 0.5;
}
function createparticles(count) {
if (count != ) {
particles = [];
for (var i = 0; i < count; i++) {
(new particle());
}
}
}
function onresize() {
width = ;
height = ;
el.width = width;
el.height = height;
createparticles((width * height) / 10000);
}
function updateparticles() {
ctx.clearrect(0, 0, width, height);
ctx.fillstyle = '#f6f9fa';
(function(particle) {
+= ;
+= ;
if ( > height) {
= 0;
}
if ( > width) {
();
= 0;
}
ctx.beginpath();
ctx.arc(, , 5, 0,* 2, false);
ctx.fill();
});
(updateparticles);
}
onresize();
updateparticles();
}
ready(function() {
var canvas = ('snow');
makesnow(canvas);
});
})();
</script>
</body>
</html>