reduce drawTime to fix perf (for now)
This commit is contained in:
parent
8bde87246b
commit
39e81aa77c
2 changed files with 5 additions and 4 deletions
|
|
@ -115,7 +115,7 @@ export class StrudelMirror {
|
||||||
id,
|
id,
|
||||||
initialCode = '',
|
initialCode = '',
|
||||||
onDraw,
|
onDraw,
|
||||||
drawTime = [-2, 2],
|
drawTime = [0, 0],
|
||||||
autodraw,
|
autodraw,
|
||||||
prebake,
|
prebake,
|
||||||
bgFill = true,
|
bgFill = true,
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,10 @@ export function Repl2({ embedded = false }) {
|
||||||
const shouldDraw = true;
|
const shouldDraw = true;
|
||||||
|
|
||||||
const init = useCallback(({ shouldDraw }) => {
|
const init = useCallback(({ shouldDraw }) => {
|
||||||
const drawTime = [0, 4];
|
// TODO: find way to make spiral & punchcard work (if there's any)
|
||||||
|
// upping the 2nd value leads to slow eval times
|
||||||
|
// because Drawer.invalidate might query alot at one time
|
||||||
|
const drawTime = [0, 0];
|
||||||
const drawContext = shouldDraw ? getDrawContext() : null;
|
const drawContext = shouldDraw ? getDrawContext() : null;
|
||||||
let onDraw;
|
let onDraw;
|
||||||
if (shouldDraw) {
|
if (shouldDraw) {
|
||||||
|
|
@ -105,8 +108,6 @@ export function Repl2({ embedded = false }) {
|
||||||
editor.setCode(randomTune);
|
editor.setCode(randomTune);
|
||||||
msg = `A random code snippet named "${name}" has been loaded!`;
|
msg = `A random code snippet named "${name}" has been loaded!`;
|
||||||
}
|
}
|
||||||
//registers samples that have been saved to the index DB
|
|
||||||
// registerSamplesFromDB(userSamplesDBConfig);
|
|
||||||
logger(`Welcome to Strudel! ${msg} Press play or hit ctrl+enter to run it!`, 'highlight');
|
logger(`Welcome to Strudel! ${msg} Press play or hit ctrl+enter to run it!`, 'highlight');
|
||||||
// setPending(false);
|
// setPending(false);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue