Need help with snow effect
Hello. As the title says i want to do a snow effect. The problem is that i can only get 1 snowflake in my picture. I really want to know how to copy the snow img so that i get many snowflakes falling from the top of the screen. Somewhere in here i have to add a code that duplicates the img "imgSnow".
if (canvas.getContext) {
ctx = canvas.getContext('2d');
function draw() {
drawBackground();
ctx.drawImage (imgSnow, x, y);
//------- Code i need ----------//
y += 9;
if (y > 450 ) {
y = -21;
x = Math.random () * 650;
}}}