Current collected state Current
Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2d-context
grabs a new 2d canvas context
Grabs a CanvasRenderingContext2D, returning null if it doesn't exist. Similar to webgl-context.
var context = require('2d-context')()
var canvas = context.canvas
or
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 and storageYou can then get a reference of the canvas element with ctx.canvas.
MIT, see LICENSE.md for details.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
browserifyEnvironment{
"local_name": "browserify",
"alias": false,
"peer_metadata": null
} | ^8.0.2 | development |
faucetEnvironment{
"local_name": "faucet",
"alias": false,
"peer_metadata": null
} | 0.0.1 | development |
tapeEnvironment{
"local_name": "tape",
"alias": false,
"peer_metadata": null
} | ^3.0.3 | development |
testlingEnvironment{
"local_name": "testling",
"alias": false,
"peer_metadata": null
} | ^1.7.1 | development |
Source distribution
{
"shasum": "b4c6b59172dd02d977e93a4855797177f8ec7700",
"tarball": "https://registry.npmjs.org/2d-context/-/2d-context-1.2.0.tgz",
"integrity": "sha512-ejS/jWyLtR0IKRGaic65H+nJQuQfgb95xDIebnf+L4ZQZ/ZETBcG+NElID5Fo1ETf2eUHPXVuQsVS+EVulRJmQ==",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIAtzP+gdmf3DSH/LhVeRDfF4xOe8s7HFpMFMgW48i79mAiEAlIhjYpLbhzbV2Sw+9JcB2fdsGUlwygtrF4UFbHrLYEM="
}
]
}Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:e51b0f5328ce91f0b3df37cdbecdd9e044bc9a93f6d0d1d49c28c5ac17ee7952