work.suroh.tk/js/audio.js

18 lines
313 B
JavaScript
Raw Normal View History

2019-03-15 14:53:48 +00:00
// audio for events
// AUDIO SETUP
const audioEngine = new (window.AudioContext || window.webkitAudioContext)()
const masterGain = audioEngine.createGain()
2019-03-15 14:53:48 +00:00
window.onload = function() {
// create gain
masterGain.gain.value = 0.9
masterGain.connect(audioEngine.destination)
}
// AMBIENT
// BUTTON HOVER