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.
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?
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
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.
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.
Geo
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,
maja