grabs a new 2d canvas context
npm install 2d-contextGrabs a CanvasRenderingContext2D, returning null if it doesn't exist. Similar to webgl-context.
``js`
var context = require('2d-context')()
var canvas = context.canvas
or
`js
var canvas = document.createElement('canvas')
var context = require('2d-context')({
canvas: canvas,
alpha: true,
width: 256,
height: 256
})
`

#### ctx = require('2d-context')([opt])
Gets a new canvas context with optional parameters:
- canvas a canvas element to use, otherwise creates a new elementwidth
- a width to set, otherwise no changeheight
- a height to set, otherwise no changealpha
- other attributes are passed to the getContext call, like and storage
You can then get a reference of the canvas element with ctx.canvas`.
MIT, see LICENSE.md for details.