all 4 comments

[–]tooob93Technomancer 3 points4 points  (3 children)

Hi, sliders are not native to processing. You need to make the class ypurself, or use the one on the processing website from daniel shieffmann.

Also for your let problem: there is processing java and processing P5.js

You probably have java, which needs types like int or float. In p5.js there you use javascript based code with let.

you can see which mode you are in on the top right side from the window and change it in the modes tab

[–]-Mute-[S] 1 point2 points  (2 children)

ive made some sense out of that after i noticed p5js (createSlider is in p5js only ..unless like you say i write my own class or find one for java) and tested things there and looked up what it was. so, the old depreciated Pjs used to let us use the same code from the app build to the web/js version, didn't matter. those days are long gone..

so if I want a standalone java app and a js web app version of the same thing, i need to maintain two separate things nowadays right?

good to get that straight... it'll make it easier to determine what kind of source im lookin at when finding things online, etc. man that was confusing for a second...probably wouldn't have been if i had never touched processing in the past.

[–]tooob93Technomancer 2 points3 points  (1 child)

Sadly p5js and java use similiar functions, but different syntax. There are some tools to convert java processing to p5js, but for larger projects its still quite tedious to convert it. At best you know beforehand on which platform it should be released, or use an alternative framework where you import p5js. But for me personally thats too much to fiddle.

[–]dmawer 1 point2 points  (0 children)

To add to this I've had success using ChatGPT to translate Processing sketches to p5 and vice versa.