begin reimplementing draw logic for parallel use

This commit is contained in:
Felix Roos 2022-12-26 20:58:57 +01:00
parent 0792d0d59d
commit 2d1b62a978
9 changed files with 550 additions and 250 deletions

View file

@ -14,8 +14,10 @@ function useStrudel({
afterEval,
onEvalError,
onToggle,
canvasId,
}) {
const id = useMemo(() => s4(), []);
canvasId = canvasId || `canvas-${id}`;
// scheduler
const [schedulerError, setSchedulerError] = useState();
const [evalError, setEvalError] = useState();
@ -97,6 +99,8 @@ function useStrudel({
};
const error = schedulerError || evalError;
return {
id,
canvasId,
code,
setCode,
error,