Skip to content Skip to sidebar Skip to footer

How To Make A Processing Sketch With External Libraries And Files Work On A Website?

So I have made a game using Processing and have used 2 java libraries (minim for sound and java.util.map for a hashmap), as well as having many external image and sound files which

Solution 1:

Short answer: you can't.

You can deploy basic Processing sketches using Processing.js, but that won't work if your sketch contains Java libraries.

(Side note: you don't need to import java.util.HashMap to use it in a Processing sketch. Just use HashMap directly. That would actually work with Processing.js.)

If you use Java libraries, then your only option is to deploy as an application and have users download your program.

The other option is to get rid of the Java libraries and use JavaScript libraries instead. You can call JavaScript code from Processing.js code. See here for more info.

Shameless self-promotion: I wrote a guide on the different versions of Processing and how you can deploy them, available here.

Post a Comment for "How To Make A Processing Sketch With External Libraries And Files Work On A Website?"