I'm currently testing out Canvas JS libraries. I'd like to build a simple paint type of web app using Canvas and JS. I'd like to be able to create layers, draw, erase, etc. I tested out PaperJS, but it seems PaperJS is more geared towards SVG and fails at erasing. What popular Canvas JS libraries is everyone using nowadays?
I prefer PixiJS (<a href="http://www.pixijs.com" rel="nofollow">http://www.pixijs.com</a>), it comes with a ton of primitives and renders efficiently even on mobile. I've created layered drag-and-drop webapps with Pixi, draw & erase would not be much different.
If you're building something simple, why not just use the HTML5 Canvas API?<p>There's no reason to overcomplicate things, and it'll give you fine control over how things work and what you expect it to do. Layers and whatnot are pretty simple to implement a rough cut of, so why make things complicated?
I am a big fan of pixi.js (<a href="http://www.pixijs.com" rel="nofollow">http://www.pixijs.com</a>). I haven't explored its "erasing" capabilities, but it is a great library for performant 2d graphics programming in the browser.
In simple cases like you described, you can always create your own. I've done something sorta like that in here: <a href="https://github.com/felipegtx/Raska" rel="nofollow">https://github.com/felipegtx/Raska</a>
If you have an ActionScript background, I highly recommend Easel JS.<p><a href="http://www.createjs.com/easeljs" rel="nofollow">http://www.createjs.com/easeljs</a>
i really liked to use fabric.js(<a href="http://fabricjs.com" rel="nofollow">http://fabricjs.com</a>) for a small collaborative drawing tool(<a href="https://github.com/wearespindle/dotd" rel="nofollow">https://github.com/wearespindle/dotd</a>). It runs both on node.js and in the browser, has pretty awesome serialization options and has all batteries included in general.