Virus Spread Simulator

P5.js is based on JavaScript, there are differences in how that works compared with other modes, like Java, Android and Processing.js (which, to be fair, is compiled to JavaScript in the end)

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