support logs in mini repl
+ pass hap to logger + add editPattern hook to repl + useStrudel + do not throw when webaudio gets plain values
This commit is contained in:
parent
10ee11c886
commit
69ecb7b54f
8 changed files with 317 additions and 228 deletions
|
|
@ -12,6 +12,7 @@ function useStrudel({
|
|||
autolink = false,
|
||||
beforeEval,
|
||||
afterEval,
|
||||
editPattern,
|
||||
onEvalError,
|
||||
onToggle,
|
||||
canvasId,
|
||||
|
|
@ -44,6 +45,7 @@ function useStrudel({
|
|||
setCode(code);
|
||||
beforeEval?.();
|
||||
},
|
||||
editPattern: editPattern ? (pat) => editPattern(pat, id) : undefined,
|
||||
afterEval: ({ pattern: _pattern, code }) => {
|
||||
setActiveCode(code);
|
||||
setPattern(_pattern);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue