Using OpenProcessing

Thanks again for all your help. Just to let you know I have found a solution to using Web Workers in OpenProcesing.

  1. The web worker code file should be a code tab rather than imported into files
  2. Mark all code tabs as javascript by adding the .js extension. This includes the web worker file.
  3. choose the HTML/CSS/JS mode.
  4. in index,html add script tags for all your code files except the web worker.
  5. in index.html add script tags for p5js and any third party libraries used.

I have used this in my “Train Tracks” sketch (see below) which uses a web worker to create new puzzles.

3 Likes