edit particles

This commit is contained in:
2025-07-04 02:30:40 -04:00
parent 36b3b38035
commit 728c01d2f7
4 changed files with 64 additions and 1694 deletions

View File

@ -39,13 +39,19 @@ function createParticle() {
if (Math.random() > 0.6) particle.classList.add('large');
particle.style.left = `${Math.random() * 100}%`;
particle.style.top = `${Math.random() * 100}%`;
particle.style.animationDelay = `${Math.random() * 10}s`;
particle.style.animationDuration = `${10 + Math.random() * 8}s`;
particle.style.animationDelay = `${Math.random() * 8}s`;
particle.style.animationDuration = `${8 + Math.random() * 6}s`;
document.body.appendChild(particle);
setTimeout(() => particle.remove(), 18000);
// Remove particle with fade-out effect
setTimeout(() => {
particle.classList.add('fade-out');
// Wait for fade-out animation to complete before removing
setTimeout(() => particle.remove(), 500);
}, 14000);
}
setInterval(createParticle, 500);
// Create particles frequently
setInterval(createParticle, 50);
function throttle(fn, wait) {
let lastTime = 0;