How to make a rendering on the canvas?

How to render multiple graphical primitives into a canvas?
At the moment I have a regular class Primitive, which has a draw () method.
Accordingly, the stack layers with classes. I plan on doing observer to track changes layers. If something changed, redraw all the layers.
At the moment I see a few things - using requestAnimationFrame to make rendering more responsive.
How things normally work?
July 9th 19 at 11:00
1 answer
July 9th 19 at 11:02
Do you really need a canvas?
The browser itself is comfortable, and works exactly as you need.
To use z-index a bunch canvases, instead of one...

Find more questions by tags CanvasCoffeeScriptHTMLJavaScript