@NebbishHacker, tried to run your Web-linked code in the emulator and get:
>
____ _
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|____|___| _|_| |___|_|_|_|___|
|_| espruino.com
2v10.9 (c) 2021 G.Williams
>
>Execution Interrupted
at line 210 col 4
});
^
in function called from line 215 col 4
})();
^
New interpreter error: LOW_MEMORY,MEMORY
>Uncaught Error: Cannot read property 'canvas' of undefined
at line 221 col 18
let canvas = trui.canvas();
^
>Uncaught Error: Cannot read property 'render' of undefined
at line 235 col 9
canvas.render(
^
in function "draw" called from line 265 col 6
draw();
^
in function "tick" called from line 276 col 6
tick();
^
>
What do I miss here?
(See no reason why it should not run in the emulator.)
The problem was my use of a particularly long immediately invoked function expression - it only worked for me because I had enabled "Pretokenise code before upload" in the web ide settings.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@NebbishHacker, tried to run your Web-linked code in the emulator and get:
What do I miss here?
(See no reason why it should not run in the emulator.)