# Uploading P5.js sketch from P3 IDE

**URL:** <https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447>\
**Category:** Beginners\
**Created:** [January 28, 2021, 10:03pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447 "2021-01-28T22:03:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![geo3geo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/geo3geo/32/11881_2.png) [@geo3geo](https://discourse.processing.org/u/geo3geo)\
**Post date:** [January 28, 2021, 10:03pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/1 "2021-01-28T22:03:51Z")

</div>

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](http://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](http://OpenProcessing.org) ? Again, what am I missing?

Tried another tack. Started ‘Create sketch’ on [OpenProcessing.org](http://OpenProcessing.org) and copied in my files again. The program that ran on P5js web editor won’t run on [OpenProcessing.org](http://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.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [January 28, 2021, 10:15pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/2 "2021-01-28T22:15:59Z")

</div>

Hey, got it running here.

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

Check out [Covid Simulator 2 - OpenProcessing](https://openprocessing.org/sketch/1080771)

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!

---

<div class="post-metadata">

**Author:** ![geo3geo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/geo3geo/32/11881_2.png) [@geo3geo](https://discourse.processing.org/u/geo3geo)\
**Post date:** [January 29, 2021, 9:02am UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/3 "2021-01-29T09:02:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![geo3geo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/geo3geo/32/11881_2.png) [@geo3geo](https://discourse.processing.org/u/geo3geo)\
**Post date:** [January 29, 2021, 9:40am UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/4 "2021-01-29T09:40:34Z")

</div>

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](http://www.mecol.co.uk/P5js/Covid/index.html)

But not as a sketch in [Processing.org](http://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](http://Processing.org) sketches?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [January 29, 2021, 2:35pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/5 "2021-01-29T14:35:21Z")

</div>

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,

Chrisir

---

<div class="post-metadata">

**Author:** ![geo3geo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/geo3geo/32/11881_2.png) [@geo3geo](https://discourse.processing.org/u/geo3geo)\
**Post date:** [January 29, 2021, 3:14pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/6 "2021-01-29T15:14:13Z")

</div>

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.

Many thanks for your support  
Geo

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 29, 2021, 4:15pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/7 "2021-01-29T16:15:07Z")

</div>

> [@geo3geo](#):
>
> Pity I can’t do that any more with Java based Processing.

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

1. [Sierpinski Condensed [Java] - OpenProcessing](https://openprocessing.org/sketch/954181)
2. [Sierpinski Pentagon [Java] - OpenProcessing](https://openprocessing.org/sketch/955443)
3. [Rotating Cube [Java/Pjs] - OpenProcessing](https://openprocessing.org/sketch/421281)
4. [3D Knot (Java) - OpenProcessing](https://openprocessing.org/sketch/608725)
5. [Ramer–Douglas–Peucker Algorithm - OpenProcessing](https://openprocessing.org/sketch/747172)
6. [Drops [Java/Pjs] - OpenProcessing](https://openprocessing.org/sketch/965902)
7. [Players Movement (Java) - OpenProcessing](https://openprocessing.org/sketch/718355)
8. [Random Tiled Terrain Gen [Java/Pjs] - OpenProcessing](https://openprocessing.org/sketch/436477)

---

<div class="post-metadata">

**Author:** ![geo3geo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/geo3geo/32/11881_2.png) [@geo3geo](https://discourse.processing.org/u/geo3geo)\
**Post date:** [January 29, 2021, 6:15pm UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/8 "2021-01-29T18:15:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![medikid](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@medikid](https://discourse.processing.org/u/medikid)\
**Post date:** [November 22, 2021, 9:39am UTC](https://discourse.processing.org/t/uploading-p5-js-sketch-from-p3-ide/27447/9 "2021-11-22T09:39:38Z")

</div>

hi,  
i posted long question in that other section:

> [@8 bezier parameters to 12 bezier parameters in 3d](https://discourse.processing.org/t/8-bezier-parameters-to-12-bezier-parameters-in-3d/33595/3):
>
> Thank you for your answer! I corrected and put full code above, both examples. That is what I was thinking too, z is 0. But is it? But to be more clear, here you can see how it should look: [[Waiting for fullfilment II / Patience] ](https://www.youtube.com/watch?v=gZPw0KCGfKg) and code for that is from 2011 here: openprocessing online editor sketch/78564 (first piece above) It works nicely in processing.exe , but on openprocessing editor gives error: Uncaught You must use 12 parameters for bezier() in 3D mode Then code i…

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](https://openprocessing.org/sketch/1363086)  
i am lost with it, not sure if only bezier is not behaving or did i made other mistakes.  
thank you,  
maja
