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