// IMPLEMENT BACKGROUND EUTROPHICATION!!! const sproutDelay = 500; const toEutrophicate = 100; const samples = [document.getElementsByClassName("sample"), document.getElementsByClassName("rare")]; setInterval(() => { let rareIndicator = Math.floor(Math.random() * 50); let rare = 0; if (rareIndicator <= 0) { rare = 1; console.log("A rare lily spawned"); } let clone = samples[rare][Math.floor(Math.random() * samples[rare].length)].cloneNode(true); const id = parseInt(clone.id); clone.classList.remove("sample"); clone.classList.remove("rare"); clone.style.top = `${Math.random() * 97.5}%`; clone.style.left = `${Math.random() * 97.5}%`; clone.style.opacity = 0; document.body.appendChild(clone); setTimeout(() => { clone.style.transition = `opacity 2s linear, rotate ${60 * (id+1)}s ease-out, filter ${60 * (id+1)}s linear`; clone.style.opacity = 1; clone.style.rotate = `${(Math.random() -.5)*2 * 360 * (id+1)}deg`; clone.style.filter = `blur(${3+id}px)`; setTimeout(() => { }, 60*id); }, 200); }, sproutDelay);