I am writing some code in Processing that makes use of multiple classes. When I put them in one single JavaScript file, it is getting really long. It would be great if I could separate each class into their own file and import them in somehow.
I have tried putting the objects in their own files and tried bringing them in with script tags that look something like this:
<script type="application/processing" src="object1.js"></script>
<script type="application/processing" src="object2.js"></script>
<script type="application/processing" src="main.js"></script>
However, my main.js
file does not seem to recognize the class definitions from my other 2 files. I am writing pure Processing code to put into a web environment.
Is there something wrong with what I am doing or is this something that Processing does not support? Thank you in advance for your help!