{"name":"webgl-context","version":"1.2.1","description":"gets a WebGLRenderingContext","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"dependencies":{},"devDependencies":{"tape":"~2.13.2"},"scripts":{"test":"tape test.js"},"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"],"_id":"webgl-context@1.2.1","dist":{"shasum":"8ab965ed1f006a32b86741f8becd0ded32ad526c","tarball":"http://registry-npm.ywwl.com/webgl-context/download/webgl-context-1.2.1.tgz","integrity":"sha512-G55x+w3oOClnR0SHREVmv3djkR1SUh/QyAKgEv6sTFzSdpoKrOb0Nrc5ldSxRZvmIz4U8vfTuSmXEs5qEleuaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZYti9VtnAHFMFjxmHiiiMj0paI8uguSDCP+RhG1wdAQIgORDQA/6d3zmus68zx8vAXWZ1u1EUzH2rglG1qiHg3c0="}],"size":1867,"noattachment":false,"key":"/webgl-context/-/webgl-context-1.2.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"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":1402532869150,"_cnpm_publish_time":1402532869150,"dist-tags":{"latest":"2.2.0"}}