{"_id":"gl-shader-core","_rev":"398847","name":"gl-shader-core","description":"Core implementation of gl-shader without parser dependencies","dist-tags":{"latest":"2.2.0"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"time":{"modified":"2021-08-04T04:23:43.000Z","created":"2013-12-29T03:59:51.940Z","2.2.0":"2014-09-27T22:26:38.109Z","2.1.2":"2014-09-21T14:40:44.357Z","2.1.1":"2014-07-01T21:04:38.270Z","2.1.0":"2014-06-03T01:33:57.125Z","2.0.1":"2014-05-07T21:03:09.246Z","2.0.0":"2014-02-06T05:06:13.236Z","1.1.0":"2014-02-04T02:04:16.541Z","1.0.0":"2014-02-02T22:43:57.884Z","0.0.3":"2014-02-01T17:21:40.560Z","0.0.2":"2014-02-01T16:39:23.831Z","0.0.1":"2014-01-28T15:23:23.379Z","0.0.0":"2013-12-29T03:59:51.940Z"},"users":{"0x4c3p":true,"plitat":true,"yolk":true},"author":{"name":"Mikola Lysenko"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"versions":{"2.2.0":{"name":"gl-shader-core","version":"2.2.0","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^1.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@2.2.0","dist":{"shasum":"e4788ebd135ce0d1ec52fdbc42800a2b98879e03","size":6348,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-2.2.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1411856798109,"_cnpm_publish_time":1411856798109,"_hasShrinkwrap":false},"2.1.2":{"name":"gl-shader-core","version":"2.1.2","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^1.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@2.1.2","dist":{"shasum":"d01543df68dd4d9bb20327b06f6aa3aa0679d395","size":6227,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-2.1.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1411310444357,"_cnpm_publish_time":1411310444357,"_hasShrinkwrap":false},"2.1.1":{"name":"gl-shader-core","version":"2.1.1","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^1.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@2.1.1","dist":{"shasum":"2b7f0fc1ace08bc44e54486482019a5c874d1cda","size":6242,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-2.1.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1404248678270,"_cnpm_publish_time":1404248678270,"_hasShrinkwrap":false},"2.1.0":{"name":"gl-shader-core","version":"2.1.0","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^1.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@2.1.0","dist":{"shasum":"c38df6daa41a18da4277d3bf1ddfb7183321dba7","size":6188,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-2.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1401759237125,"_cnpm_publish_time":1401759237125,"_hasShrinkwrap":false},"2.0.1":{"name":"gl-shader-core","version":"2.0.1","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^1.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@2.0.1","dist":{"shasum":"efa73aebb939bfe7162c87b1e56e90909cb36d83","size":6085,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-2.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1399496589246,"_cnpm_publish_time":1399496589246,"_hasShrinkwrap":false},"2.0.0":{"name":"gl-shader-core","version":"2.0.0","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^0.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@2.0.0","dist":{"shasum":"4b2ed810a7922c3f2846fad32f58c04049a0c952","size":6074,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-2.0.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1391663173236,"_cnpm_publish_time":1391663173236,"_hasShrinkwrap":false},"1.1.0":{"name":"gl-shader-core","version":"1.1.0","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"^0.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@1.1.0","dist":{"shasum":"697a0d47eae18f0fbac7db64c4cf5ab005e64d47","size":6186,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1391479456541,"_cnpm_publish_time":1391479456541,"_hasShrinkwrap":false},"1.0.0":{"name":"gl-shader-core","version":"1.0.0","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"0.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@1.0.0","dist":{"shasum":"76d1e4ab45795618abe9be84e97b182300c45f92","size":6007,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1391381037884,"_cnpm_publish_time":1391381037884,"_hasShrinkwrap":false},"0.0.3":{"name":"gl-shader-core","version":"0.0.3","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"0.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@0.0.3","dist":{"shasum":"3387147413b99591f7d114df3183f7ad977649fc","size":5997,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-0.0.3.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1391275300560,"_cnpm_publish_time":1391275300560,"_hasShrinkwrap":false},"0.0.2":{"name":"gl-shader-core","version":"0.0.2","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"0.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@0.0.2","dist":{"shasum":"d39ce6ace7b8e5601ab33eded16db8ff96f086e4","size":5981,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1391272763831,"_cnpm_publish_time":1391272763831,"_hasShrinkwrap":false},"0.0.1":{"name":"gl-shader-core","version":"0.0.1","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"0.0.0"},"homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@0.0.1","dist":{"shasum":"ad83932b3f7b59e5184e20423079dbbbe7f077b9","size":5976,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1390922603379,"_cnpm_publish_time":1390922603379,"_hasShrinkwrap":false},"0.0.0":{"name":"gl-shader-core","version":"0.0.0","description":"Core implementation of gl-shader without parser dependencies","main":"shader-core.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/gl-shader-core.git"},"keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dependencies":{"dup":"0.0.0"},"readmeFilename":"README.md","homepage":"https://github.com/mikolalysenko/gl-shader-core","_id":"gl-shader-core@0.0.0","dist":{"shasum":"7cbe04a23ef3ac543a52a116c09748ece0f4eeae","size":5965,"noattachment":false,"key":"/gl-shader-core/-/gl-shader-core-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gl-shader-core/download/gl-shader-core-0.0.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1388289591940,"_cnpm_publish_time":1388289591940,"_hasShrinkwrap":false}},"readme":"gl-shader-core\n==============\nThe core of [gl-shader](https://github.com/mikolalysenko/gl-shader), without the parser.  It can be used to compile shaders without including the (relatively large) glsl-parser dependencies, or invoked directly by libraries which use a transform.\n\n## Install\n\n    npm install gl-shader-core\n    \n## API\n\n### `var shader = require(\"gl-shader-core\")(gl, vertexSource, fragmentSource, uniforms, attributes)`\nConstructs a packaged gl-shader object with shims for all of the uniforms and attributes in the program.\n\n* `gl` is the webgl context in which the program will be created\n* `vertexSource` is the source code for the vertex shader\n* `fragmentSource` is the source code for the fragment shader\n* `uniforms` is a list of all uniforms exported by the shader program\n* `attributes` is a list of all attributes exported by the shader program\n\nThe uniform and attributes variables have output which is consistent with [glsl-extract](https://npmjs.org/package/glsl-extract). \n\n**Returns** A compiled shader object.\n\nYou can specify a default `location` number for each attribute, otherwise WebGL will bind it automatically. \n\n## Methods\n\n### `shader.bind()`\nBinds the shader for rendering\n\n### `shader.dispose()`\nDeletes the shader program and associated resources.\n\n## Properties\n\n### `gl`\nThe WebGL context associated to the shader\n\n### `handle`\nA handle to the underlying WebGL program object\n\n### `vertexShader`\nA handle to the underlying WebGL fragment shader object\n\n### `fragmentShader`\nA handle to the underlying WebGL vertex shader object\n\n## Uniforms\nThe uniforms for the shader program are packaged up as properties in the `shader.uniforms` object.  For example, to update a scalar uniform you can just assign to it:\n\n```javascript\nshader.uniforms.scalar = 1.0\n```\n\nWhile you can update vector uniforms by writing an array to them:\n\n```javascript\nshader.uniforms.vector = [1,0,1,0]\n```\n\nMatrix uniforms must have their arrays flattened first:\n\n```javascript\nshader.uniforms.matrix = [ 1, 0, 1, 0,\n                           0, 1, 0, 0,\n                           0, 0, 1, 1,\n                           0, 0, 0, 1 ]\n```\n\nYou can also read the value of uniform too if the underlying shader is currently bound.  For example,\n\n```javascript\nconsole.log(shader.uniforms.scalar)\nconsole.log(shader.uniforms.vector)\nconsole.log(shader.uniforms.matrix)\n```\n\nStruct uniforms can also be accessed using the normal dot property syntax.  For example,\n\n```javascript\nshader.uniforms.light[0].color = [1, 0, 0, 1]\n```\n\n## Attributes\n\nThe basic idea behind the attribute interface is similar to that for uniforms, however because attributes can be either a constant value or get values from a vertex array they have a slightly more complicated interface.  All of the attributes are stored in the `shader.attributes` property.\n\n### `attrib = constant`\nFor non-array attributes you can set the constant value to be broadcast across all vertices.  For example, to set the vertex color of a shader to a constant you could do:\n\n```javascript\nshader.attributes.color = [1, 0, 0, 1]\n```\n\nThis internally uses [`gl.vertexAttribnf`](http://www.khronos.org/opengles/sdk/docs/man/xhtml/glVertexAttrib.xml). Setting the attribute will also call `gl.disableVertexAttribArray` on the attribute's location.\n\n### `attrib.location`\nThis property accesses the location of the attribute.  You can assign/read from it to modify the location of the attribute.  For example, you can update the location by doing:\n\n```javascript\nattrib.location = 0\n```\n\nOr you can read the currently bound location back by just accessing it:\n\n```javascript\nconsole.log(attrib.location)\n```\n\nInternally, these methods just call [`gl.bindAttribLocation`](http://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindAttribLocation.xml) and access the stored location.\n\n**WARNING** Changing the attribute location requires recompiling the program.  Do not dynamically modify this variable in your render loop.\n\n### `attrib.pointer([type, normalized, stride, offset])`\nA shortcut for `gl.vertexAttribPointer`/`gl.enableVertexAttribArray`.  See the [OpenGL man page for details on how this works](http://www.khronos.org/opengles/sdk/docs/man/xhtml/glVertexAttribPointer.xml).  The main difference here is that the WebGL context, size and index are known and so these parameters are bound.\n\n* `type` is the type of the pointer (default `gl.FLOAT`)\n* `normalized` specifies whether fixed-point data values should be normalized (`true`) or converted directly as fixed-point values (`false`) when they are accessed.  (Default `false`)\n* `stride` the byte offset between consecutive generic vertex attributes.  (Default: `0`)\n* `offset` offset of the first element of the array in bytes. (Default `0`)\n\n## Reflection\n\nFinally, the library supports some reflection capabilities.  The set of all uniforms and data types are stored in the \"type\" property of the shader object,\n\n```javascript\nconsole.log(shader.types)\n```\n\nThis reflects the uniform and attribute parameters that were passed to the shader constructor.\n\n\n## Credits\n(c) 2013 Mikola Lysenko. MIT License","_attachments":{},"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"license":"MIT"}