Paper.js is an open source vector graphics scripting framework for working with the Canvas element. According to its website, it's based on and largely compatible with the Adobe Illustrator scripting environment Scriptographer.
The site emphasizes that Paper.js is not just a wrapper around Canvas. Some of its features include:
- A document object model for vector graphics.
- Paths and segments
- Keyboard and mouse interaction
- Vector geometry
- Mathematical operatations