When comparing Processing.js vs p5.js, the Slant community recommends p5.js for most people. In the question“What are the best JavaScript drawing libraries?” p5.js is ranked 2nd while Processing.js is ranked 4th. The most important reason people chose p5.js is:
Reference documentation and lots of examples are available directly on the [website](http://p5js.org/).
Ranked in these QuestionsQuestion Ranking
Pros
Pro Good at creating complex visual effects and filters
Pro Fast rendering of complex scenes
Because Processing doesn't keep track of shape objects it's more efficient than other libraries. Processing can do more complicated effects faster than other libraries. Although this means you have to keep track of more yourself in your code, it also means you have more control over the finer details of how things are rendered.
Pro Cross-platform compatibility
In processing you can write code in both JavaScript and Processing code. This allows you to use existing Processing code on the client side.
Processing code is similar to Java in that it has static typing. This can make more complex calculations more robust, and less likely to cause conflicts.
The library takes a more frame based approach to rendering, so you use drawing functions to draw directly to the frame without objects. This can make it easier to write efficient full frame rendering scenes and post processing effects.
Pro Accessible documentation
Reference documentation and lots of examples are available directly on the website.
Pro Great community
p5 users benefit from the Processing community's 15+ years of growth and discovery. Processing code can easily be converted to p5.
Pro General programming concepts
As a continuation of the Processing project, this frameworks helps in understanding the general programming concepts that goes beyond drawing (connecting electronics, using sounds or the webcam etc),
Pro Easiest to learn to obtain high grade results
In a few days any body can understand extremely complex figures in a few minutes.
Pro A lot of YouTube tutorials
Cons
Con Processing.js is now archived, and won't be updated
Con No built-in rendering
If looking for something to build UIs with or similar, one might be disappointed by the lack of any pre-defined UI element objects and such in p5.js. One has to write all the rendering code for any objects one includes, integrating it appropriately with the loop.