Added image tool

This commit is contained in:
2025-07-21 19:30:29 +02:00
parent 56c1e10e06
commit 6d0436b0b5
3 changed files with 98 additions and 3 deletions

View File

@@ -27,15 +27,14 @@
function run_experiment() {
const code = view.state.doc.toString();
const code_to_run = `(canvas, context, code) => {
const code_to_run = `async (canvas, context, code) => {
const C = context;
const W = canvas.width;
const H = canvas.height;
${code}
}`;
eval(code_to_run)(canvas, context, code);
return eval(code_to_run)(canvas, context, code); //Returning it so we can await it if we'd like to
}