only start animation loop when canvas is visible

+ add some placeholder files
This commit is contained in:
Felix Roos 2022-12-26 22:59:41 +01:00
parent 56cd77942b
commit 7b43ed702e
7 changed files with 62 additions and 60 deletions

View file

@ -37,7 +37,7 @@ export function MiniRepl({ tune, hideOutsideView = false, enableKeyboard, withCa
usePatternFrame({
pattern,
started,
started: withCanvas && started,
getTime: () => scheduler.now(),
onDraw: (time, haps) => {
const ctx = document.querySelector('#' + canvasId).getContext('2d');