Skip to content
Sign upLog in
← Back to Community

how do i add multiple java processing files in replit?

Profile icon
adsarebbbad

i don't really know how to have more than 1 processing file in replit

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
someone2060
Profile icon
adsarebbbad
Comments
hotnewtop
Profile icon
Coder100

hm, doesn't look like it's possible. Sorry :(

I recommend using p5 it's nearly the same as processing (other than being in js of course!) with a few tweaks like push() instead of pushMatrix(). Anyways, then all you have to do is add another script tag.

Profile icon
adsarebbbad

how does it work?

@Coder100

Profile icon
Coder100

what do you mean

@adsarebbbad

Profile icon
Coder100
Profile icon
adsarebbbad

can you add multiple files in p5?

@Coder100

Profile icon
Coder100

didn't I say that already, of course you can

@adsarebbbad

Profile icon
Coder100

oh probably not a big JS person hm?
So to add another file:

<script src="path/to/file.js"></script>

in your HTML and make sure that the code you want to be run in the file must be in a function.

Then, to use it:

function draw() { funcname(); // whatever the function you declared }

@adsarebbbad

Profile icon
adsarebbbad

uhhhhhh...... what

@Coder100

Profile icon
Coder100
Profile icon
Coder100

whats your question

@adsarebbbad

Profile icon
adsarebbbad

i don't get what you're saying

@Coder100

Profile icon
Coder100

what part?

@adsarebbbad

Profile icon
Coder100

must I have to give an example?
Fair enough.

@adsarebbbad

Profile icon
adsarebbbad

can you give an example?

@Coder100

Profile icon
Coder100
Profile icon
adsarebbbad

you only need to add a script src? wow

@Coder100

Profile icon
Coder100