alphaland snow update :)

This commit is contained in:
Astrologies 2021-12-16 06:15:40 -05:00
parent a9f4282c62
commit 1cfe9898ca
1 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ function Blizzard(parentId) {
c.height = H; c.height = H;
//This varies the number of snowflakes showing dependent on size of the element //This varies the number of snowflakes showing dependent on size of the element
numFlakes = Math.floor(W / 25); numFlakes = Math.floor(W);
ctx.clearRect(0, 0, W, H); ctx.clearRect(0, 0, W, H);
//snowflake flakes //snowflake flakes
@ -62,7 +62,7 @@ function Blizzard(parentId) {
flakes.push({ flakes.push({
x: Math.random() * W, //x-coordinate x: Math.random() * W, //x-coordinate
y: Math.random() * H, //y-coordinate y: Math.random() * H, //y-coordinate
r: Math.random() * 9 + 1 //radius r: Math.random() * 3 //radius
}); });
} }
@ -90,7 +90,7 @@ function Blizzard(parentId) {
for (var i = 0; i < numFlakes; i++) { for (var i = 0; i < numFlakes; i++) {
angle += 0.01; //angle += 0.01;
var p = flakes[i]; var p = flakes[i];
//Updating X and Y coordinates //Updating X and Y coordinates