Cap ambient particles to five concurrently
This commit is contained in:
parent
71174e8477
commit
9cd43d8c67
@ -410,6 +410,8 @@ function scheduleAmbientDrift() {
|
||||
const delay = 10000 + Math.random() * 10000; // 10–20s
|
||||
fireflyTimer = setTimeout(() => {
|
||||
if (!animationsEnabled) { stopAmbientDrift(); return; }
|
||||
const existing = document.querySelectorAll(isDarkMode ? '.firefly-wrap' : '.seed-wrap').length;
|
||||
if (existing >= 5) { scheduleAmbientDrift(); return; }
|
||||
if (isDarkMode) {
|
||||
spawnFirefly();
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user