Guys I found, forked and tweaked a virus spread simulator, just trying to deal with self isolation right now. I made this into a tutorial, the simulator is up on my site so you can try it out - using Processing.js but also works with Processing, and Processing for Android.
Check it out here: https://www.circusscientist.com/virus-spread-simulator-with-processing-js/
Credit where credit is due, the original is by Vinay Raghavan
We can also use OpenProcessing.org/sketch/create and others in order to deploy to the web.
By default it runs p5js sketches; but we can easily switch to Pjs engine on its right-side panel.
Then we can copy’n’paste both the original & your remix source code there and click the play icon :
I still am confused about Processing.js
I promise, the only part that is remotely challenging is processing.js, and only because it has been a bit neglected by the official Processing IDE.
Why has it been neglected? Wasn´t it just replaced with P5.js
By all means, use P5, but you are going to have to change a few things in your Java code to get it to run. See https://github.com/processing/p5.js/wiki/Processing-transition
It’s great to hear that OpenProcessing has a Pjs engine now, is this new or did I just miss it? I used to use that site when it was all about applets, remember those?
I think I sent a reply to the wrong person here, about P5.js… Sorry about that
OpenProcessing.org from its very start has always & never stopped offering hosting for Pjs’s Java syntax sketches!
Flavor p5.js is its latest addition and, b/c Pjs has been abandoned by the Processing Foundation in favor of p5.js, it’s become its default engine.
The last Processing.js release was 1.6.6 ~2017, but the website was last updated in 2014, which contributes to the impression that it is old. Even more, the key thing is that the mode plugin doesn’t ship with Processing 3, and the version in contributions manager is only compatible with Processing 2. That makes it feel “neglected” for those that want to write Java-mode-for-the-web on the desktop – you have to install Processing 2 to use it.
Just a little reminder that we can also target the Pjs library using straight JS syntax (or any other language which can be transpiled to JS) besides Java.
I’ve done that using CoffeeScript syntax transpiled to JS at the link below:
BtW, both the original “.coffee” and the corresponding transpiled “.js” files are side-by-side.
Hi @tomjuggler, I ran the virus spread sim and got lucky non of the dots got infected. Check out this screen shot
Wish we were all that lucky… Stay home and keep safe!