names changed
This commit is contained in:
@@ -31,7 +31,7 @@ function toggleSnowfall() {
|
|||||||
if (!animationFrameId) {
|
if (!animationFrameId) {
|
||||||
initializeCanvas();
|
initializeCanvas();
|
||||||
snowflakes = createSnowflakes(santaContainer);
|
snowflakes = createSnowflakes(santaContainer);
|
||||||
animateSnowfall();
|
animateSanta();
|
||||||
} else {
|
} else {
|
||||||
console.warn('could not initialize santa: animation frame is already running');
|
console.warn('could not initialize santa: animation frame is already running');
|
||||||
}
|
}
|
||||||
@@ -140,10 +140,10 @@ function updateSnowflakes() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function animateSnowfall() {
|
function animateSanta() {
|
||||||
drawSnowflakes();
|
drawSnowflakes();
|
||||||
updateSnowflakes();
|
updateSnowflakes();
|
||||||
animationFrameId = requestAnimationFrame(animateSnowfall);
|
animationFrameId = requestAnimationFrame(animateSanta);
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize santa
|
// initialize santa
|
||||||
@@ -163,6 +163,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
console.log('Santa enabled.');
|
console.log('Santa enabled.');
|
||||||
initializeCanvas();
|
initializeCanvas();
|
||||||
snowflakes = createSnowflakes(container);
|
snowflakes = createSnowflakes(container);
|
||||||
animateSnowfall();
|
animateSanta();
|
||||||
}
|
}
|
||||||
});
|
});
|
Reference in New Issue
Block a user