mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
fix hydra performance issues
This commit is contained in:
@@ -4,11 +4,11 @@ export async function initHydra() {
|
||||
if (!document.getElementById('hydra-canvas')) {
|
||||
const { canvas: testCanvas } = getDrawContext();
|
||||
await import('https://unpkg.com/hydra-synth');
|
||||
const hydraCanvas = testCanvas.cloneNode(true);
|
||||
hydraCanvas.id = 'hydra-canvas';
|
||||
testCanvas.after(hydraCanvas);
|
||||
new Hydra({ canvas: hydraCanvas, detectAudio: false });
|
||||
s0.init({ src: testCanvas });
|
||||
h = new Hydra({detectAudio: false });
|
||||
h.canvas.id = 'hydra-canvas';
|
||||
h.canvas.style.position = 'absolute';
|
||||
h.canvas.style.top = '0px';
|
||||
testCanvas.after(h.canvas);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user