Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
hovinhthanh7893 committed Jan 13, 2023
1 parent 60a895d commit 9d481f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Binary file added audios/Whoosh.mp3
Binary file not shown.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,20 @@ document
} else {
this.style.opacity = 0.2;
backgroundSound.play();
backgroundSound.volume = 0.2;
backgroundSound.volume = 0.5;
backgroundSound.loop = true;
this.style.backgroundImage = "url('./icons/icon-sound-96.png')";
soundOn = true;
}
});

//WHOOSH SOUND
document.querySelectorAll("a").forEach((each) => {
each.addEventListener("click", function(event) {
const whoosh = new Audio("./audios/Whoosh.mp3");
whoosh.play();
});
});

//FUNCTIONS FOR ANIMATION
let noise = openSimplexNoise.makeNoise4D(Date.now());
Expand Down Expand Up @@ -453,10 +460,8 @@ function moveCam(setting) {
function changeFooter(setting) {
if (setting === 0) {
document.querySelector(".foot").style.justifyContent = "center";
document.querySelector(".foot").style.paddingTop = "5vh";
} else {
document.querySelector(".foot").style.justifyContent = "flex-end";
document.querySelector(".foot").style.paddingTop = "3vh";
}
}

Expand Down

0 comments on commit 9d481f9

Please sign in to comment.