We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello you all, I am quite a novice with processing and programming in general, and I am trying to figure out how to run a code into a browser. I have been reading about this processing.js so I followed the instruction here: http://processingjs.org/articles/p5QuickStart.html#obtainingpjs i.e. I download this processing.js file and created a html file with the script suggested in the link, everything in the same directory of a simple processing code (3.3.4). but what the browser loads is the script: (maybe I am missing something very trivial, but I am really not familiar with .html)
That does not change with Opera (49.0), Firefox (57.0) or Chrome (62.0.3202.94).
I read the following threads, and could not come up with a solution: https://forum.processing.org/two/discussion/24760/help-playing-sketches-on-the-web https://forum.processing.org/two/discussion/23720/processingjs-download#Item_1 https://forum.processing.org/two/discussion/comment/108125/#Comment_108125
Is there anyone who could give me a hint of what am I getting wrong?
Answers
Those 3 forum threads got all my tips for Pjs already! @-)
What is that
(3.3.4)
? Is it the PDE btW? If so, Processing.js Mode isn't available for PDE 3! :-&Some related post: https://www.Reddit.com/r/processing/comments/7dqqvh/openprocessing_converting_code_written_in_java_to/
Thanks ^:)^
Is there a specific reason you are using the older and less supported Processing.js and not the newer p5.js ? Both are fine, but if you are new to programming and just trying to get new code running in the browser then p5.js might be the way to go.
You can download Processing PDE and use its p5.js Mode. The examples should run directly in your browser.