I added a meow sound for cat and some fixed and added cursor for volume #7

Merged
DMZTdhruv merged 7 commits from main into main 2024-07-26 17:08:37 +01:00
5 changed files with 14 additions and 6 deletions

1
.gitignore vendored
View File

@@ -249,4 +249,3 @@ $RECYCLE.BIN/
# End of https://www.toptal.com/developers/gitignore/api/python,windows,macos,linux # End of https://www.toptal.com/developers/gitignore/api/python,windows,macos,linux
*.mp3

BIN
web/audio/cat-meow.mp3 Normal file

Binary file not shown.

View File

@@ -1,7 +1,8 @@
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<!doctype html> <!DOCTYPE html>
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<title>infinifi</title> <title>infinifi</title>
<link rel="preload" href="./style.css" as="style"> <link rel="preload" href="./style.css" as="style">
@@ -12,12 +13,12 @@
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<link rel="stylesheet" href="./style.css"> <link rel="stylesheet" href="./style.css">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@kennethnym"> <meta name="twitter:site" content="@kennethnym">
<meta name="twitter:title" content="infinifi"> <meta name="twitter:title" content="infinifi">
<meta name="twitter:description" content="infinite lo-fi beats in the background"> <meta name="twitter:description" content="infinite lo-fi beats in the background">
</head> </head>
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<body> <body>
<div class="container"> <div class="container">
<main> <main>
@@ -28,7 +29,7 @@
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
</div> </div>
<div class="volume-slider-container"> <div class="volume-slider-container">
<output id="current-volume-label" for="volume-slider">100%</output> <output id="current-volume-label" for="volume-slider">100%</output>
<input id="volume-slider" type="range" min="0" max="100" step="1" /> <input id="volume-slider" type="range" min="0" max="100" step="1">
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
</div> </div>
</main> </main>
<img class="cat" src="./images/cat-0.png"> <img class="cat" src="./images/cat-0.png">
@@ -37,13 +38,14 @@
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<footer> <footer>
<span>made by kennethnym &lt;3 ·&nbsp;</span> <span>made by kennethnym &lt;3 ·&nbsp;</span>
<a target="_blank" href="https://github.com/kennethnym/infinifi">github</a> <a target="_blank" rel="noopener noreferrer" href="https://github.com/kennethnym/infinifi">github</a>
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
</footer> </footer>
<canvas id="bg"></canvas> <canvas id="bg"></canvas>
<audio id="click-audio" preload="auto" src="./audio/click.wav"></audio> <audio id="click-audio" preload="auto" src="./audio/click.wav"></audio>
<audio id="click-release-audio" preload="auto" src="./audio/click-release.wav"></audio> <audio id="click-release-audio" preload="auto" src="./audio/click-release.wav"></audio>
<audio id="meow-audio" preload="auto" src="./audio/cat-meow.mp3"></audio>
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
<script type="module" src="./bg.js"></script> <script type="module" src="./bg.js"></script>
<script type="module" src="./script.js"></script> <script type="module" src="./script.js"></script>
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)
kennethnym commented 2024-07-25 12:34:17 +01:00 (Migrated from github.com)
Review

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

if u could revert the indent changes back to using tab that would be great. (biome doesn't support html at the moment)

View File

@@ -4,6 +4,7 @@ const volumeSlider = document.getElementById("volume-slider");
const currentVolumeLabel = document.getElementById("current-volume-label"); const currentVolumeLabel = document.getElementById("current-volume-label");
const clickAudio = document.getElementById("click-audio"); const clickAudio = document.getElementById("click-audio");
const clickReleaseAudio = document.getElementById("click-release-audio"); const clickReleaseAudio = document.getElementById("click-release-audio");
const meowAudio = document.getElementById("meow-audio");
const CROSSFADE_DURATION_MS = 5000; const CROSSFADE_DURATION_MS = 5000;
const CROSSFADE_INTERVAL_MS = 20; const CROSSFADE_INTERVAL_MS = 20;
@@ -132,6 +133,11 @@ playBtn.onmousedown = () => {
); );
}; };
// Cat audio sound function
catImg.onmousedown = () => {
meowAudio.play();
};
playBtn.onclick = () => { playBtn.onclick = () => {
if (isPlaying) { if (isPlaying) {
pauseAudio(); pauseAudio();
@@ -149,6 +155,7 @@ volumeSlider.oninput = () => {
} }
clickAudio.volume = volumeSlider.value / 100; clickAudio.volume = volumeSlider.value / 100;
clickReleaseAudio.volume = volumeSlider.value / 100; clickReleaseAudio.volume = volumeSlider.value / 100;
meowAudio.volume = volumeSlider.value / 100;
}; };
volumeSlider.value = 100; volumeSlider.value = 100;

View File

@@ -290,4 +290,4 @@ input[type="range"]::-ms-fill-upper {
.button:after { .button:after {
opacity: 0.5; opacity: 0.5;
} }
} }