Enhance CSS animations and performance across seasonal styles; add will-change property for smoother transitions and optimize keyframes. [skip ci]
This commit is contained in:
@@ -228,7 +228,19 @@ function createBirthday() {
|
||||
// Ensure the burst container is appended to the main document body or the birthday container
|
||||
createBalloonPopConfetti(document.body, cx, cy, balloonColors[randomItem]);
|
||||
}
|
||||
}, { once: true });
|
||||
});
|
||||
|
||||
// Reset the balloon when it reappears at the bottom of the screen
|
||||
symbol.addEventListener('animationiteration', function(e) {
|
||||
// Ignore bubbling events from the inner sway animation
|
||||
if (e.animationName === 'birthday-rise' || e.target === symbol) {
|
||||
if (innerDiv.classList.contains('popped')) {
|
||||
innerDiv.classList.remove('popped');
|
||||
innerDiv.style.animation = '';
|
||||
innerDiv.style.pointerEvents = 'auto';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const startRot = (Math.random() * 20) - 10; // -10 to +10 spread
|
||||
|
||||
Reference in New Issue
Block a user