Skip to content

Commit

Permalink
Update sound creation and position handling in index.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctoth committed Feb 6, 2024
1 parent 1ee070f commit 7935cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

document.getElementById('playSound').addEventListener('click', async () => {
const soundUrl = document.getElementById('soundUrl').value;
sound = await cacophony.createSound(soundUrl, SoundType.Buffer);
sound = await cacophony.createSound(soundUrl, SoundType.Buffer, panType);
sound.play();
});

Expand All @@ -39,7 +39,7 @@
});
});

document.getElementById('positionX').addEventListener('input', (event) => {
document.getElementById('positionX').addEventListener('input', (event) => {
const x = parseFloat(event.target.value);
if (sound) sound.position = [x, sound.position[1], sound.position[2]];
});
Expand Down

0 comments on commit 7935cd8

Please sign in to comment.