Pencil.js is a nice modular interactive 2D drawing library.
It aim to abstract drawing with code with a clear OOP syntax.
Its modular architecture allow to grab or replace every block.
And of course, it has a concise and complete documentation to never feel lost.
We promise that it'll always work as you expect.
Go check the full documentation.