fix hydra performance issues
This commit is contained in:
parent
b27f8e45dc
commit
de00212bb6
1 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue