Crafty.canvas
Collection of methods to draw on canvas.
Back to top
Crafty.canvas.context
This will return the 2D context of the main canvas element.
The value returned from Crafty.canvas._canvas.getContext('2d').
Back to top
Crafty.canvas.init
public void Crafty.canvas.init(void)
Events
- NoCanvas
- triggered if
Crafty.support.canvasis false
Creates a canvas element inside Crafty.stage.elem. Must be called
before any entities with the Canvas component can be drawn.
This method will automatically be called if no Crafty.canvas.context is
found.

@craftyjs
#crafty@freenode.net
google groups
louis@craftyjs.com
github