mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 04:58:27 +00:00
comment
This commit is contained in:
parent
456be920d3
commit
9045ce05da
@ -16,14 +16,12 @@ export async function initHydra(options = {}) {
|
|||||||
if (!document.getElementById('hydra-canvas')) {
|
if (!document.getElementById('hydra-canvas')) {
|
||||||
const { src = 'https://unpkg.com/hydra-synth', ...opts } = options;
|
const { src = 'https://unpkg.com/hydra-synth', ...opts } = options;
|
||||||
await import(src);
|
await import(src);
|
||||||
|
|
||||||
hydra = new Hydra(opts);
|
hydra = new Hydra(opts);
|
||||||
appendCanvas(hydra);
|
appendCanvas(hydra);
|
||||||
// s0.init({ src: hydraCanvas }); // whats that?
|
// hydra.synth.s0.init({ src: testCanvas }); // is this needed?
|
||||||
}
|
} else if (options?.detectAudio && !hydra?.detectAudio) {
|
||||||
// if options.detectAudio is true
|
// if options.detectAudio is true
|
||||||
// and current canvas des not detect audio
|
// and current canvas des not detect audio
|
||||||
else if (options?.detectAudio && !hydra?.detectAudio) {
|
|
||||||
//remove previous canvas without audio detection
|
//remove previous canvas without audio detection
|
||||||
document.getElementById('hydra-canvas').remove();
|
document.getElementById('hydra-canvas').remove();
|
||||||
return initHydra(options);
|
return initHydra(options);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user