Make streak animation faster and shorter

This commit is contained in:
2026-09-21 12:26:40 +05:30
parent 857ac320f1
commit 1e75980fcf

View File

@@ -746,8 +746,8 @@
emojiRunning = true;
if (!rafEmoji) rafEmoji = requestAnimationFrame(emojiTick);
const rounds = Math.round(5 + intensity * 8);
const gap = Math.round(340 - intensity * 130);
const rounds = Math.round(3 + intensity * 4); // Half the rounds
const gap = Math.round(200 - intensity * 80); // Faster gaps
const base = Math.round(30 + intensity * 36);
for (let k = 0; k < rounds; k++) {
@@ -756,17 +756,17 @@
// Alternating left and right flank grand fireworks
fwTimers.push(setTimeout(() => flankBurst(false, base), d));
fwTimers.push(setTimeout(() => flankBurst(true, base), d + 90));
fwTimers.push(setTimeout(() => flankBurst(true, base), d + 60));
// Flank confetti and celebratory emojis (strictly on left/right wings)
fwTimers.push(setTimeout(() => spawnFlankConfetti(3 + Math.round(intensity * 4)), d + 40));
fwTimers.push(setTimeout(() => spawnFlankEmojiRain(2 + Math.round(intensity * 3), false), d + 80));
fwTimers.push(setTimeout(() => spawnFlankConfetti(3 + Math.round(intensity * 4)), d + 20));
fwTimers.push(setTimeout(() => spawnFlankEmojiRain(2 + Math.round(intensity * 3), false), d + 40));
}
fwTimers.push(setTimeout(() => {
running = false;
emojiRunning = false;
}, rounds * gap + 1200));
}, rounds * gap + 500)); // Finish quickly after last burst
}
// ── 11. Crying Sad Mood (Streak <= 2: 0, 1, or 2 Days) ───────────────────