Uploading P5.js sketch from P3 IDE

I’ve created a program using P3 IDE in P5.js mode. Runs well on my Chrome web server so now I want to share it on the P5js.org web site.

I foolishly assumed I would be able to upload my project like I used to do with Java Processing but no way can I find a way to do that. If I’m missing something blindingly obvious can someone please put me right.

Anyway, I’ve copied each file from my program into the P5js online web editor which seems an incredibly tedious thing to have to do but it runs. I’ve saved it and it’s name seems to be 6Ranl2kyQ . How do I make it visible on OpenProcessing.org ? Again, what am I missing?

Tried another tack. Started ‘Create sketch’ on OpenProcessing.org and copied in my files again. The program that ran on P5js web editor won’t run on OpenProcessing.org. It complains about the first line of code it sees, which is simply:
var population = 200;

It’s saved as Covid Simulator ( 1080703 ) if anyone can find it to see what on earth is going on here.

This is my first venture into P5js and I find it incredibly frustrating. Hope someone can help.

1 Like

Hey, got it running here.

Had to kill your long comment, maybe /* */ was too much for him?

Check out Covid Simulator 2 - OpenProcessing

Edit: Yeah, I had to replace /* */ with // before all lines in your comment section

Hey, and welcome to the forum!

Great to have you here!

I’ve moved my block comment to the end and all ok.
I’d never have thought of that.
Thanks Chrisir.

1 Like

I was a bit premature on ‘all ok’ - the graph doesn’t update properly. Works fine on P5js web editor, works sending to local Chrome Browser from P3 IDE, and also works when loaded into a browser from my own webspace at http://www.mecol.co.uk/P5js/Covid/index.html

But not as a sketch in Processing.org !
I’d have thought the P5js interpreter would be common to all?
So maybe I’ve gone outside some display size limitation on Processing.org sketches?

I am out of my depth here.

Maybe you have to update your processing IDE (and install the current mode for p5?)?

I don’t use p5 to be honest, I am sorry.

Can you describe in which way it doesn’t work?

Warm Regards,


Hi - the graph at the bottom was about 10 seconds behind the real events. Weird.
I’ve reduced the canvas from 560 square to 500 and that’s fixed it. Seems I’ve found the canvas limit :grinning:

I’d not bother with P5js except it gives me a very easy way of sharing programs with friends. Pity I can’t do that any more with Java based Processing.

Many thanks for your support

1 Like

Well, here’s 8 Java Mode (Pjs) sketches on OpenProcessing.org:

  1. Sierpinski Condensed [Java] - OpenProcessing
  2. Sierpinski Pentagon [Java] - OpenProcessing
  3. Rotating Cube - OpenProcessing
  4. 3D Knot (Java) - OpenProcessing
  5. Ramer–Douglas–Peucker Algorithm - OpenProcessing
  6. Drops - OpenProcessing
  7. Players Movement (Java) - OpenProcessing
  8. Random Tiled Terrain Gen - OpenProcessing

Hi GoToLoop - that’s interesting, didn’t know OP was supporting java sketches any more. I now see I can set the Sketch generator to Pjs. I’ll see if I can get my old sketches to run in that mode.


i posted long question in that other section:

but i hope that i can ask here too, as i am really having trouble transfering
p3 to p5js. example is here: old threads - OpenProcessing
i am lost with it, not sure if only bezier is not behaving or did i made other mistakes.
thank you,