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
4 changed files with 159 additions and 169 deletions
Showing only changes of commit bc7a219118 - Show all commits

View File

@@ -1,51 +1,56 @@
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>
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)
<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)
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>
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="preload" href="./style.css" as="style"> <link rel="preload" href="./style.css" as="style" />
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="modulepreload" href="./bg.js"> <link rel="modulepreload" href="./bg.js" />
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="modulepreload" href="./script.js"> <link rel="modulepreload" href="./script.js" />
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="preload" href="./images/cat-0.png" as="image"> <link rel="preload" href="./images/cat-0.png" as="image" />
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="preload" href="./images/eeping-cat.png" as="image"> <link rel="preload" href="./images/eeping-cat.png" as="image" />
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" />
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)
<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)
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" />
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)
<meta name="twitter:site" content="@kennethnym"> <meta name="twitter:site" content="@kennethnym" />
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)
<meta name="twitter:title" content="infinifi"> <meta name="twitter:title" content="infinifi" />
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)
<meta name="twitter:description" content="infinite lo-fi beats in the background"> <meta name="twitter:description" content="infinite lo-fi beats in the background" />
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)
</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)
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>
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 class="container"> <div class="container">
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)
<main> <main>
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)
<h1 class="header">infinifi</h1> <h1 class="header">infinifi</h1>
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)
<h2>infinite lo-fi music in the background</h2> <h2>infinite lo-fi music in the background</h2>
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 class="button-container"> <div class="button-container">
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)
<button id="play-btn" class="button">play</button> <button id="play-btn" class="button">play</button>
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>
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 class="volume-slider-container"> <div class="volume-slider-container">
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)
<output id="current-volume-label" for="volume-slider">100%</output> <output id="current-volume-label" for="volume-slider">100%</output>
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)
<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>
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)
</main> </main>
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)
<img class="cat" src="./images/cat-0.png"> <img class="cat" src="./images/cat-0.png" />
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)
<img class="eeping-cat" src="./images/eeping-cat.png"> <img class="eeping-cat" src="./images/eeping-cat.png" />
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>
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>
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)
<span>made by kennethnym &lt;3 ·&nbsp;</span> <span>made by kennethnym &lt;3 ·&nbsp;</span>
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)
<a href="https://github.com/kennethnym/infinifi">github</a> <a 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>
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)
<canvas id="bg"></canvas> <canvas id="bg"></canvas>
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)
<audio id="click-audio" preload="auto" src="./audio/click.wav"></audio> <audio id="click-audio" preload="auto" src="./audio/click.wav"></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)
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)
<audio id="click-release-audio" preload="auto" src="./audio/click-release.wav"></audio> <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)
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)
id="click-release-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)
preload="auto"
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)
src="./audio/click-release.wav"
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)
></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)
<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>
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)
<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)
</body> </body>
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>
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;
@@ -16,139 +17,142 @@ let maxVolume = 100;
let currentVolume = 0; let currentVolume = 0;
function playAudio() { function playAudio() {
// add a random query parameter at the end to prevent browser caching // add a random query parameter at the end to prevent browser caching
currentAudio = new Audio(`./current.mp3?t=${Date.now()}`); currentAudio = new Audio(`./current.mp3?t=${Date.now()}`);
currentAudio.onplay = () => { currentAudio.onplay = () => {
isPlaying = true; isPlaying = true;
playBtn.innerText = "pause"; playBtn.innerText = "pause";
}; };
currentAudio.onpause = () => { currentAudio.onpause = () => {
isPlaying = false; isPlaying = false;
currentVolume = 0; currentVolume = 0;
playBtn.innerText = "play"; playBtn.innerText = "play";
}; };
currentAudio.onended = () => { currentAudio.onended = () => {
currentVolume = 0; currentVolume = 0;
playAudio(); playAudio();
}; };
currentAudio.volume = 0; currentAudio.volume = 0;
currentAudio.play(); currentAudio.play();
fadeIn(); fadeIn();
setTimeout(() => { setTimeout(() => {
fadeOut(); fadeOut();
}, AUDIO_DURATION_MS - CROSSFADE_DURATION_MS); }, AUDIO_DURATION_MS - CROSSFADE_DURATION_MS);
} }
function pauseAudio() { function pauseAudio() {
currentAudio.pause(); currentAudio.pause();
currentAudio.volume = 0; currentAudio.volume = 0;
currentVolume = 0; currentVolume = 0;
} }
function fadeIn() { function fadeIn() {
isFading = true; isFading = true;
// volume ranges from 0 to 100, this determines by how much the volume number // volume ranges from 0 to 100, this determines by how much the volume number
// should be incremented at every step of the fade in // should be incremented at every step of the fade in
const volumeStep = const volumeStep = maxVolume / (CROSSFADE_DURATION_MS / CROSSFADE_INTERVAL_MS);
maxVolume / (CROSSFADE_DURATION_MS / CROSSFADE_INTERVAL_MS); const handle = setInterval(() => {
const handle = setInterval(() => { currentVolume += volumeStep;
currentVolume += volumeStep; if (currentVolume >= maxVolume) {
if (currentVolume >= maxVolume) { clearInterval(handle);
clearInterval(handle); currentVolume = maxVolume;
currentVolume = maxVolume; isFading = false;
isFading = false; } else {
} else { currentAudio.volume = currentVolume / 100;
currentAudio.volume = currentVolume / 100; }
} }, CROSSFADE_INTERVAL_MS);
}, CROSSFADE_INTERVAL_MS);
} }
function fadeOut() { function fadeOut() {
isFading = true; isFading = true;
// volume ranges from 0 to 100, this determines by how much the volume number // volume ranges from 0 to 100, this determines by how much the volume number
// should be decremented at every step of the fade out // should be decremented at every step of the fade out
const volumeStep = const volumeStep = maxVolume / (CROSSFADE_DURATION_MS / CROSSFADE_INTERVAL_MS);
maxVolume / (CROSSFADE_DURATION_MS / CROSSFADE_INTERVAL_MS); const handle = setInterval(() => {
const handle = setInterval(() => { currentVolume -= volumeStep;
currentVolume -= volumeStep; if (currentVolume <= 0) {
if (currentVolume <= 0) { clearInterval(handle);
clearInterval(handle); currentVolume = 0;
currentVolume = 0; isFading = false;
isFading = false; } else {
} else { currentAudio.volume = currentVolume / 100;
currentAudio.volume = currentVolume / 100; }
} }, CROSSFADE_INTERVAL_MS);
}, CROSSFADE_INTERVAL_MS);
} }
function animateCat() { function animateCat() {
let current = 0; let current = 0;
setInterval(() => { setInterval(() => {
if (current === 3) { if (current === 3) {
current = 0; current = 0;
} else { } else {
current += 1; current += 1;
} }
catImg.src = `./images/cat-${current}.png`; catImg.src = `./images/cat-${current}.png`;
}, 500); }, 500);
} }
/** /**
* Allow audio to be played/paused using the space bar * Allow audio to be played/paused using the space bar
*/ */
function enableSpaceBarControl() { function enableSpaceBarControl() {
document.addEventListener("keydown", (event) => { document.addEventListener("keydown", event => {
if (event.code === "Space") { if (event.code === "Space") {
playBtn.classList.add("button-active"); playBtn.classList.add("button-active");
playBtn.dispatchEvent(new MouseEvent("mousedown")); playBtn.dispatchEvent(new MouseEvent("mousedown"));
clickAudio.play(); clickAudio.play();
} }
}); });
document.addEventListener("keyup", (event) => { document.addEventListener("keyup", event => {
if (event.code === "Space") { if (event.code === "Space") {
playBtn.classList.remove("button-active"); playBtn.classList.remove("button-active");
clickReleaseAudio.play(); clickReleaseAudio.play();
} }
}); });
document.addEventListener("keypress", (event) => { document.addEventListener("keypress", event => {
if (event.code === "Space") { if (event.code === "Space") {
playBtn.click(); playBtn.click();
} }
}); });
} }
playBtn.onmousedown = () => { playBtn.onmousedown = () => {
clickAudio.play(); clickAudio.play();
document.addEventListener( document.addEventListener(
"mouseup", "mouseup",
() => { () => {
clickReleaseAudio.play(); clickReleaseAudio.play();
}, },
{ once: true }, { once: true }
); );
}; };
kennethnym commented 2024-07-25 12:37:35 +01:00 (Migrated from github.com)
Review
  • this is a very very cute interaction 🥺. i think mousedown will make it even better as it will feel like ur petting the cat!!
  • to align with the rest of the code, prefer using catImg.onmouseenter instead of addEventListener (no particular reason why i preferred one over the other but onxxx was what i used at the beginning so i stuck with it)
- this is a very very cute interaction 🥺. i think `mousedown` will make it even better as it will feel like ur petting the cat!! - to align with the rest of the code, prefer using catImg.onmouseenter instead of `addEventListener` (no particular reason why i preferred one over the other but `onxxx` was what i used at the beginning so i stuck with it)
catImg.addEventListener("mouseover", () => {
meowAudio.play();
});
playBtn.onclick = () => { playBtn.onclick = () => {
if (isPlaying) { if (isPlaying) {
pauseAudio(); pauseAudio();
} else { } else {
playAudio(); playAudio();
} }
}; };
volumeSlider.oninput = () => { volumeSlider.oninput = () => {
maxVolume = volumeSlider.value; maxVolume = volumeSlider.value;
currentVolumeLabel.textContent = `${maxVolume}%`; currentVolumeLabel.textContent = `${maxVolume}%`;
if (!isFading && currentAudio) { if (!isFading && currentAudio) {
currentAudio.volume = maxVolume / 100; currentAudio.volume = maxVolume / 100;
currentVolume = maxVolume; currentVolume = maxVolume;
} }
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

@@ -26,6 +26,7 @@
html, html,
body { body {
width: 100%; width: 100%;
overflow: hidden;
} }
body { body {
@@ -151,6 +152,10 @@ a {
display: flex; display: flex;
} }
.button-container .button {
cursor: pointer;
}
.volume-slider-container { .volume-slider-container {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -174,6 +179,7 @@ a {
appearance: none; appearance: none;
border: 2px solid var(--text); border: 2px solid var(--text);
background-color: var(--base); background-color: var(--base);
cursor: col-resize;
} }
input[type="range"]::-webkit-slider-runnable-track { input[type="range"]::-webkit-slider-runnable-track {