OCE.js is a layer-based javascript library to help organize drawing of 2D objects in an HTML Canvas.
Handling many graphic objects can get confusing quickly. A lot of involved math is required. This library allows you to hit the ground running.
OCE.js is really lightweight, yet organized in such a way you can build up on it quickly.
[tutorial]
-Position, rotation, zooming and skewing transforms.
-Composing transforms in layers.
-Detaching and reattaching of layers to any other layer.
-Backbuffer is a layer.
-May have pixel buffer layers.
-Can switch layers without perceived movement of the object being switched.
-Example object and starter textbox, image and circle objects.
-Point collision with bounding boxes.
[reference]