diff --git a/index.html b/index.html index 6f08d14..131c3a7 100644 --- a/index.html +++ b/index.html @@ -28,13 +28,17 @@ - + + + + +
@@ -131,8 +135,8 @@ // Bird Button - const DISTANCE = 40 - const birdIcon = document.getElementById("birdButton"); + const DISTANCE = 20 + const birdButton = document.getElementById("birdButton"); const birdSound = new Audio("SnowBuntingSound.ogg"); const template = document.getElementById("barTemplate"); const wrap = document.querySelector(".bird-wrap"); @@ -144,7 +148,7 @@ clone.style.setProperty("--angle", `${angle}deg`); clone.style.setProperty("--distance", `${-distance}px`); clone.style.setProperty("--delay", `${delay}s`); - wrap.appendChild(clone); + birdButton.appendChild(clone); clone.addEventListener("animationend", () => clone.remove()); } @@ -158,7 +162,7 @@ spawnBar(DISTANCE, -rightRandom, 0.8) } - birdIcon.addEventListener("click", (e) => { + birdButton.addEventListener("click", (e) => { if (!birdSound.paused) return; birdSound.play(); birdSoundAnim()