When comparing Paper.js vs Paths.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 Paths.js is ranked 21st. 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 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.
Pro Just helps building graphs, complements template engines or data-binding libraries
Can be used together with a template engine such as Mustache or Handlebars to display SVG graphics or instead of a static template engine, you can use a data binding or MVC/MV* library, such as Ractive.js, Angular, Mithril or Facebook React.
Pro 3 APIs for the price of one
3 APIs of increasing abstraction:
- Low-level (svg paths)
- Basic shapes (Polygon, Rectangle, Bezier, Sector, Connector etc..)
- Basic graphs (Pie, bar, stock, radar, tree, waterfall, sankey etc...)
There is no magic, you can have as much control as you want on how you define your graphs, source code very readable.
Pro Lightweight
18kb minified.
Cons
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.