Processing sketch not working on web

445 views Asked by At

I have multiple processing projects up that are working great on my website, however I have two sketches in particular that do not work and don't display anything except small blank windows. The only similarity between the two that I can find is that they both require arrow keys to work, but besides that there are no similarities. You can inspect element to check the code, I can't seem to figure out why they are not working, any help would be greatly appreciated.
http://willhay.io/processing/crazy/ and http://willhay.io/processing/MazeRunner/

1

There are 1 answers

2
George Profenza On BEST ANSWER

Have a peak at the JavaScript Console in your browser's developer tools. You should spot this:

Failed to load resource: the server responded with a status of 404 (Not Found)
processing.min.js:18 Processing.js: Unable to execute pjs sketch.
processing.min.js:18 Uncaught TypeError: size is not a function

Perhaps the pages are attempting to initialise the Processing sketches before the document is fully loaded and the ProcessingJS library is ready. Try doing that when the page is fully loaded to be on the safe side