Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createNexusUI() {
// window.AudioEngine.initWithAudioContext(NexusUI.context);
let analysers = document.getElementsByClassName("analysers");
NexusUI.context = window.AudioEngine.audioContext;
oscilloscope = new NexusUI.Oscilloscope("oscilloscope", {
// size: default
});
oscilloscope.colorize("fill", "#000");
oscilloscope.colorize("accent", "#FFF");
// window.AudioEngine.addAnalyser(oscilloscope); // Inject oscilloscope analyser, keep encapsulation for worklet node
oscilloscope.connect(window.AudioEngine.audioWorkletNode);
spectrogram = new NexusUI.Spectrogram("spectrogram", {
// size: [100, 50]
});
spectrogram.colorize("fill", "#000");
spectrogram.colorize("accent", "#FFF");
// window.AudioEngine.addAnalyser(spectrogram); // Inject oscilloscope analyser, keep encapsulation for worklet node
spectrogram.connect(window.AudioEngine.audioWorkletNode);