diff --git a/websites/confetti/src/main.js b/websites/confetti/src/main.js index 4bd47125aee..2a353ab34b8 100644 --- a/websites/confetti/src/main.js +++ b/websites/confetti/src/main.js @@ -801,24 +801,23 @@ const modes = [ fn: function () { cleanupActiveEffects(); - const duration = 6000; - const animationEnd = Date.now() + duration; - - const confettiInterval = setInterval(function () { - if (Date.now() >= animationEnd) { - return clearInterval(confettiInterval); - } + const duration = 6000, + animationEnd = Date.now() + duration, + confettiInterval = setInterval(function () { + if (Date.now() >= animationEnd) { + return clearInterval(confettiInterval); + } - confetti({ - particleCount: 8, - angle: 90, - spread: 70, - origin: { x: Math.random(), y: 0 }, - gravity: 1.2, - ticks: 0, - colors: ['#FFD700', '#FF69B4', '#00CED1', '#FF4500'], - }); - }, 50); + confetti({ + particleCount: 8, + angle: 90, + spread: 70, + origin: { x: Math.random(), y: 0 }, + gravity: 1.2, + ticks: 0, + colors: ['#FFD700', '#FF69B4', '#00CED1', '#FF4500'], + }); + }, 50); activeIntervals.push(confettiInterval); diff --git a/websites/ribbons/src/main.js b/websites/ribbons/src/main.js index f15b5b6ef3d..e59f313f985 100644 --- a/websites/ribbons/src/main.js +++ b/websites/ribbons/src/main.js @@ -386,24 +386,23 @@ const modes = [ fn: function () { cleanupActiveEffects(); - const duration = 6000; - const animationEnd = Date.now() + duration; - - const confettiInterval = setInterval(function () { - if (Date.now() >= animationEnd) { - return clearInterval(confettiInterval); - } + const duration = 6000, + animationEnd = Date.now() + duration, + confettiInterval = setInterval(function () { + if (Date.now() >= animationEnd) { + return clearInterval(confettiInterval); + } - confetti({ - particleCount: 8, - angle: 90, - spread: 70, - origin: { x: Math.random(), y: 0 }, - gravity: 1.2, - ticks: 200, - colors: ['#FFD700', '#FF69B4', '#00CED1', '#FF4500'], - }); - }, 50); + confetti({ + particleCount: 8, + angle: 90, + spread: 70, + origin: { x: Math.random(), y: 0 }, + gravity: 1.2, + ticks: 0, + colors: ['#FFD700', '#FF69B4', '#00CED1', '#FF4500'], + }); + }, 50); activeIntervals.push(confettiInterval);