Skip to content

Commit

Permalink
sound effects added
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya Khatri committed Sep 19, 2024
1 parent 68b98c1 commit 6eb5bfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file added frontend/public/clickSoundEffect.wav
Binary file not shown.
6 changes: 5 additions & 1 deletion frontend/src/components/hallofame/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from "react";
import { getRandomInt } from "./utils/misc";
import gba from "/largeboy.png";
import { fetchPokemonData } from "./fetchPokemonData";

let scaleFactor = 1;
let maxX = 0;
let maxY = 0;
Expand Down Expand Up @@ -461,7 +462,10 @@ const Canvas: React.FC = () => {
pokemonData[pokeIndex].PokiHeight * scaleFactor * 1.5,
);
}
function playClickAudio() {}
function playClickAudio() {
const sound = new Audio('\clickSoundEffect.wav')
sound.play();
}
return (
<div style={{ position: "relative", width: "90vw", height: "90vh" }}>
{/* Canvas for video */}
Expand Down

0 comments on commit 6eb5bfa

Please sign in to comment.