work.suroh.tk/js/audio.js

18 lines
312 B
JavaScript

// audio for events
// AUDIO SETUP
const audioEngine = new(window.AudioContext || window.webkitAudioContext)()
const masterGain = audioEngine.createGain()
window.onload = function() {
// create gain
masterGain.gain.value = 0.9
masterGain.connect(audioEngine.destination)
}
// AMBIENT
// BUTTON HOVER