When comparing p5.js vs PERGOLA, 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 PERGOLA is ranked 25th. 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 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
Pro HTML
Pergola runs seamlessly in an HTML environment (option in configuration file). All the examples are provided both as SVG standalone and embedded in HTML, and are strictly equal.
Besides its universal Node Helper (http://www.svgmagazine.com/jul2011/dom-helper.html) Pergola also provides the equivalent for building HTML nodes and <foreignObject> HTML nodes.
Pro SVG native
The first and most accomplished SVG native library, 100% cross-platform compatible.
Cons
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.
Con Commercial license
PERGOLA does not offer a free version. The price for a single developer to use PERGOLA is 400 €.