We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have this processing file that runs fine locally in Processing but I can't get to run in a html page. Any suggestions on how I might accomplish that? I've heard that P5.js might work but I can't find instructions on how to clearly convert an existing file done in Processing, to P5.js. And I don't know if that process will even work. I'm also using the minim library and I'm wondering if that is also causing an issue.
Answers
Check the following tutorials: https://p5js.org/tutorials/
Specifically: https://github.com/processing/p5.js/wiki/Processing-transition
Kf
Kfrajer, thanks for the links! I'll check them out. So, you think P5.js is the way to go in order to get my processing to work online?
Yes, I don't know any other way (Procesing.js is out of question as you are using a library)
You should check the examples provided in the page to get a vibe. Minim is not going to work as you have to use what p5.js offers: https://p5js.org/reference/#/libraries/p5.sound My understanding is that you can play video and sound but they are not as versatile as the Processing version. I cannot comment much more about media features in P5.js since my exposure to it is very limited. I will let other forum goers weight their thoughts on this.
I suggest you try running some p5.js yourself. You can use http://p5js.sketchpad.cc/ or codepen. For example, here is a sample code working with images: http://p5js.sketchpad.cc/sp/pad/view/D7rVFoVTf0/latest However, it seems like sketchpad cannot play sound as it doesn't allow me to load sound files.
By the way, for converting processing to p5.js, you need to convert java to javascript. They are similar but not the same. You will need to become familiar with javascript(js) although you could limit yourself to the js offered in the reference page of p5.js for starters.
Kf
Now that JS got keyword
class
for more than 1 year already, it's even easier to convert Java Mode sketches to p5.js: ~O)https://developer.Mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor
I'd suggest https://OpenProcessing.org/sketch/create as an easier p5.js & Pjs online IDE: :bz