soundEffects #19

Merged
mico merged 5 commits from soundEffects into main 2024-11-03 22:52:40 +00:00
Showing only changes of commit bd0cc6c34d - Show all commits

View File

@ -1,8 +1,9 @@
// https://sfxr.me/
// https://github.com/chr15m/jsfxr?tab=readme-ov-file#library
// https://github.com/goldfire/howler.js
import { sfxr } from "jsfxr";
import { Howl, Howler } from "howler";
import { Howl } from "howler";
export const coinSound = () => {
const coin = sfxr.toAudio(
@ -30,7 +31,6 @@ export const lostSound = () => {
src: ["/sounds/lost.wav"],
});
// Play the sound.
fail.play();
};
@ -39,6 +39,5 @@ export const wonSound = () => {
src: ["/sounds/arcade_win.wav"],
});
// Play the sound.
won.play();
};