Review / Refactor / Example of p5 UI

I’m working on a UI using p5.js you can see it here in p5 webeditor.

It is rendered from the game loop, but could be even driven using redraw() frunction.
But I’m ok with it hogging the game loop for now.

No I don’t what to make ‘this’ and object oriented program and trying for a more functional design.
I might be getting that wrong. My use of globals might frighten some people so yeah, warned.

For a website a game loop seems impractical, unless I make a state variable and check it in the draw() loop and only render stuff that’s changed.

1 Like

You mention what kinds of feedback you don’t want: things about the main loop, global variables, object oriented design, or functional programming.

What kind of feedback do you want?

1 Like