When comparing Processing.js vs Paper.js, the Slant community recommends Paper.js for most people. In the question“What are the best JavaScript drawing libraries?” Paper.js is ranked 3rd while Processing.js is ranked 4th. The most important reason people chose Paper.js is:
It is written in a language nearly identical to JavaScript, but adds helpful operator overloading to allow you to perform coordinate arithmetic.
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 Operator overloading
It is written in a language nearly identical to JavaScript, but adds helpful operator overloading to allow you to perform coordinate arithmetic.
Pro Geometric Tests
An almost-unique feature: can test geometry if contains(), isInside() or intersects() one other object. Offers even hit-testing methods!
Pro Behaviours handled by objects
Objects in Paper make it easy to extend parent objects and run constructor functions without having to worry about JavaScript prototypal inheritance. Because of this it is easy to make compound drawing objects with their own instance variables and behaviors.
Example: each swimming tadpole follows its own behavior
These features make it easier to create objects that can act autonomously with complex behaviors. This makes Paper a good choice for particle effects and game development.
Pro Object constructors
Elements all have the option of being created with a hash of properties which promotes clean, concise, and contextually local coding practice.
Pro Good for making games
Paper uses a frame based approach to rendering the canvas. This makes it conceptually easier to create objects with animations and behaviors that interact and perform with other objects.
Along with Paper's approach to creating and managing objects this makes Paper especially good for creating applications with complex behaviors with many elements doing different actions at once, and makes it a good choice for making games.
Cons
Con Processing.js is now archived, and won't be updated
Con Limited to single instance
The code is written in a way that everything is global and limited to a single instance, there is no clean way to use 2 separate instances in the same page
Con Not supported in older browsers
Paper.js runs on top of HTML5 Canvas, which is not supported in older browsers.