quinton-ashley / p5play-web

The website for p5play.org
17 stars 13 forks source link

p5play not working with the p5js web editor #24

Closed gfairSG closed 4 months ago

gfairSG commented 4 months ago

Just a month or so ago all was working wonderfully in the p5js editor.

Now it throws errors for new Canvas...

Even the starter code https://editor.p5js.org/quinton-ashley/sketches/szN_XdV5O fails with this p5js error:

ReferenceError: Canvas is not defined at setup (/sketch.js:12:3) at _setup (https://cdn.jsdelivr.net/npm/p5@1.9.0/lib/p5.js:63319:25) at _runIfPreloadsAreDone (https://cdn.jsdelivr.net/npm/p5@1.9.0/lib/p5.js:63265:27) at p5._decrementPreload (https://cdn.jsdelivr.net/npm/p5@1.9.0/lib/p5.js:63276:25) at p5. (https://cdn.jsdelivr.net/npm/p5@1.9.0/lib/addons/p5.sound.min.js:2:98292)

Is there a way to fix this?

quinton-ashley commented 4 months ago

The only problem is with the p5js web editor. I'm not affiliated with the Processing Foundation so I can't do anything about it. Please make an error report to them but unfortunately they can be very slow with fixes! Also I recommend using any other web editor. Try https://aijs.io !

gfairSG commented 4 months ago

Hi Quinton,

Thank you for your quick response.

With your p5play template in p5js it fails but Jessie’s is working fine.

https://editor.p5js.org/jesse_harding/sketches/LCvBXl0bX

It looks like they're using the same libraries but loads Planck first.

Could it be as simple as that?

Gordon

On Mar 20, 2024, at 10:56 AM, Quinton Ashley @.***> wrote:

The only problem is with the p5js web editor. I'm not affiliated with the Processing Foundation so I can't do anything about it. Please make an error report to them but unfortunately they can be very slow with fixes. I recommend trying aijs.io

— Reply to this email directly, view it on GitHub https://github.com/quinton-ashley/p5play-web/issues/24#issuecomment-2010265314, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHE5CRJBM54K7FA4G7OMGELYZHEV7AVCNFSM6AAAAABE73REDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJQGI3DKMZRGQ. You are receiving this because you authored the thread.

quinton-ashley commented 4 months ago

ah! Yup that did the trick. It's strange I thought that's the way it was before too. planck should be loaded first.