diff --git a/canvas/test1.html b/canvas/test1.html index b0a6e7d..99f8cca 100644 --- a/canvas/test1.html +++ b/canvas/test1.html @@ -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 } diff --git a/image/test1.html b/image/test1.html new file mode 100644 index 0000000..801e134 --- /dev/null +++ b/image/test1.html @@ -0,0 +1,89 @@ + + + + + Paste Image Demo + + + + +
Paste an image here (Ctrl+V)
+ + + \ No newline at end of file diff --git a/index.html b/index.html index 58fdd29..854c56c 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,13 @@
  • Triangular lattice - corrected offset
  • + +
  • +

    Simple image playground

    + +
  • Source: https://github.com/Mikael-Lovqvist/websperiments