{"name":"webgl-context","version":"2.2.0","description":"gets a WebGLRenderingContext","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"dependencies":{"get-canvas-context":"^1.0.1"},"devDependencies":{"browserify":"^8.0.2","faucet":"0.0.1","smokestack":"^3.1.0","tape":"^3.0.3"},"scripts":{"test":"npm run test-browser && npm run test-node","test-browser":"browserify test/test.js | smokestack | faucet","test-node":"node test/test-node.js | faucet"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"repository":{"type":"git","url":"git://github.com/mattdesl/webgl-context.git"},"homepage":"https://github.com/mattdesl/webgl-context","bugs":{"url":"https://github.com/mattdesl/webgl-context/issues"},"keywords":["webgl","glsl","context","glcontext","gl","webglrenderingcontext","webglcontext"],"gitHead":"ec7217556f7034b7d07baac8259bb0cf36c23c3f","_id":"webgl-context@2.2.0","_shasum":"8f37d7257cf6df1cd0a49e6a7b1b721b94cc86a0","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"8f37d7257cf6df1cd0a49e6a7b1b721b94cc86a0","tarball":"http://registry-npm.ywwl.com/webgl-context/download/webgl-context-2.2.0.tgz","integrity":"sha512-q/fGIivtqTT7PEoF07axFIlHNk/XCPaYpq64btnepopSWvKNFkoORlQYgqDigBIuGA1ExnFd/GnSUnBNEPQY7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHmeDx6M/bguWYuM+93eQWnsws15hK0ps/0doHbz+WahAiEArGBHi4eZybFxQqV9A1i5MaE5zV0PMQ2X/IQj7wFjyvE="}],"size":2096,"noattachment":false,"key":"/webgl-context/-/webgl-context-2.2.0.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"readme":"# webgl-context\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nGrabs a WebGLRenderingContext, returning null if it doesn't exist. Similar to [2d-context](https://nodei.co/npm/2d-context/).\n\n```js\n//get a webgl context, will be null if not found\nvar gl = require('webgl-context')()\n\nif (gl) {\n    document.body.appendChild(gl.canvas)\n    //do something...\n}\n```\n\nOr, with options:\n\n```js\n//or with optional settings...\nvar gl = require('webgl-context')({\n    canvas: canvas, //the canvas DOM element to use\n    width: 400, //resizes the canvas..\n    height: 200, \n    antialias: true //can specify custom attributes here\n})\n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/webgl-context.png)](https://nodei.co/npm/webgl-context/)\n\n#### `ctx = require('webgl-context')([opt])`\n\nGets a new canvas context with optional parameters:\n\n- `canvas` a canvas element to use, otherwise creates a new element\n- `width` a width to set, otherwise no change\n- `height` a height to set, otherwise no change\n- other attributes are passed to the getContext call, like `alpha` and `antialias`\n\nYou can then get a reference of the canvas element with `ctx.canvas`. \n\n## See Also\n\n- [get-canvas-context](https://www.npmjs.com/package/get-canvas-context)\n- [2d-context](https://www.npmjs.com/package/2d-context)\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/webgl-context/blob/master/LICENSE.md) for details.\n","publish_time":1434045589318,"_cnpm_publish_time":1434045589318,"dist-tags":{"latest":"2.2.0"}}