basic hydra integration
This commit is contained in:
parent
05095805f1
commit
7f3cdedef9
7 changed files with 261 additions and 44 deletions
11
packages/hydra/hydra.mjs
Normal file
11
packages/hydra/hydra.mjs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export async function initHydra() {
|
||||
if (!document.getElementById('hydra-canvas')) {
|
||||
await import('https://unpkg.com/hydra-synth');
|
||||
const testCanvas = document.getElementById('test-canvas');
|
||||
const hydraCanvas = testCanvas.cloneNode(true);
|
||||
hydraCanvas.id = 'hydra-canvas';
|
||||
testCanvas.after(hydraCanvas);
|
||||
new Hydra({ canvas: hydraCanvas, detectAudio: false });
|
||||
s0.init({ src: testCanvas });
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue