I am trying to develop a drawing tool using HTML 5 canvas. When I searched for a good HTML 5 JavaScript library, most of them where focused just on generating static images or animations. What I am looking for is the ability to draw primitive shapes like rectangle, circle etc. and also add click events to them. I should also be able to transform the shapes using handles.
I know I may need to customize some framework, but still.. if there is an existing framework with these features it would be good to know.
I read in some places that SVG will be good for all the interactive stuff I am planning to do more than canvas. Would that be more appropriate?
According to their website:
Paper.JS is an open source vector graphics scripting framework that runs on top of the HTML5 Canvas.
and
offers mouse handlers for the different actions you can perform with a mouse (or touch screen).
Another graphics library in JavaScript is three.js. According to their website:
The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies. The library provides canvas, SVG and WebGL renderers.
I'm not sure how good the support is for handling mouse events in the library. The following SO question deals with an example for it: Event handling for geometries in Three.js?