If we use Pjs as a JS library, we can use any vanilla JS libraries on it as well.
For example, this is a Pjs sketch written in CoffeeScript transpiled to JS:
- GitHub.com/GoSubRoutine/Ball-in-the-Chamber/tree/master/pjs-cs
- GoSubRoutine.GitHub.io/Ball-in-the-Chamber/pjs-cs
And now that same Pjs sketch written in Processing’s Java Mode:
- GitHub.com/GoSubRoutine/Ball-in-the-Chamber/tree/master/pjs-java
- GoSubRoutine.GitHub.io/Ball-in-the-Chamber/pjs-java
But if we end up converting a Java Mode sketch to use the JS syntax (or another JS transpilable language), there’s little reason to target the old Pjs instead of the current p5js library though.