JavaScript - Canvas snowing animation
I want to create a snowing animation effect in JavaScript. My knowledge is really poor in this coding language. However, I managed to do that with one snowflake, with a loop as well. I now want to generate more than one snowflake. Can someone help me to figure out how to generate more snowflakes? let canvas = document.getElementById("wip"); let ctx = canvas.getContext("2d"); canvas.width = window.innerWidth-30; canvas.height = window.innerHeight-30; let xloc = Math.floor(Math.random() * canvas.width); let yloc = 0; ctx.strokeStyle="#"+((1<<24)*Math.random()|0).toString(16); function drawflake(
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.