make regular cyclist work in the background
+ use worker-timers in Repl + repl / cyclist now accept custom interval functions
This commit is contained in:
parent
7889017434
commit
14a5e7dcb6
5 changed files with 51 additions and 6 deletions
|
|
@ -17,6 +17,8 @@ export function repl({
|
|||
editPattern,
|
||||
onUpdateState,
|
||||
sync = false,
|
||||
setInterval,
|
||||
clearInterval,
|
||||
}) {
|
||||
const state = {
|
||||
schedulerError: undefined,
|
||||
|
|
@ -44,6 +46,8 @@ export function repl({
|
|||
updateState({ started });
|
||||
onToggle?.(started);
|
||||
},
|
||||
setInterval,
|
||||
clearInterval,
|
||||
};
|
||||
|
||||
// NeoCyclist uses a shared worker to communicate between instances, which is not supported on mobile chrome
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue