How to use p5.js with my own IDE

Hi, everyone. I have so many problems about starting using p5.js in my local IDE and 8th-wall IDE(an AR js platform).
I used online link:

First, I’m curious that in the official examples, preload(), setup() … are only defined, but are never called. How could they work?

Next, when I try to use </>sound = loadSound()</>, it doesn’t work at all and said “don’t have variable loadSound”. Then I used </>p = new p5(); sound = loadSound(reqiure(url))</>. The error disappeared, but the object doesn’t have play() function.

And also, I could not use </>let amp = new p5.Amplitude()</>

Almost all materials are based on the official IDE. Anyone has some ideas? Thank you!

They are called by the system. Processing ide wraps the code you write and calls setup() once and draw() repeatedly unless you tell it not to by noLoop()-function.

I’m quite happy with processing ide and wouldn’t want to try to rewrite those automatic things by myself

1 Like

Do you mean you only use official ide? Thanks

Yes. With a large Processing Java project I would use Eclipse or similar IDE.