{"_id":"gl-shader-core","_rev":"46-4a86ccbf00272cc34116a63f6a2bdf22","name":"gl-shader-core","dist-tags":{"latest":"2.2.0"},"versions":{"0.0.0":{"name":"gl-shader-core","version":"0.0.0","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@0.0.0","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"7cbe04a23ef3ac543a52a116c09748ece0f4eeae","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-0.0.0.tgz","integrity":"sha512-v60f2Lk0YzAY8Ahcd6r8auaZ9ee1LnYp+mq3Qg7y+u6MaY5GwNlola1DOnmA2OzS9TTJn541T66ZURXUTCDUUg==","signatures":[{"sig":"MEYCIQCVkfEvbrO9UE+xfJcfT3TqkBBs/J1xkbGDLOuQzP+3nQIhANNidGHqAhEUhPqNTRuGOvNi4OAH2ORncZi3/o5FYoBV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"0.0.0"}},"0.0.1":{"name":"gl-shader-core","version":"0.0.1","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@0.0.1","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"ad83932b3f7b59e5184e20423079dbbbe7f077b9","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-0.0.1.tgz","integrity":"sha512-STPwaPQgxuQ7YvINi4+O/Dbg8sVMcwjVFERNnOEaSmdgJdk4vJyqq3XNtiQ1BZ4a14paMsEk0azQHBO6m6TpUA==","signatures":[{"sig":"MEYCIQCL7kKrvqbdgIkcEe9KOWyijwHld4ZM7iBPez/SgLEpiwIhAKh3MUAcN3XravnnQmL2eGvwSkUZVOjhnWUEg95lFIqT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"0.0.0"}},"0.0.2":{"name":"gl-shader-core","version":"0.0.2","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@0.0.2","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"d39ce6ace7b8e5601ab33eded16db8ff96f086e4","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-0.0.2.tgz","integrity":"sha512-kY1I3ksrEixK8Q/Lqers65uzbWVKR9vUkFvwKYCyo9pjwHp6ScQwmE4JCsHn7eMDN/aC/n3OcXZE8wrz89JEWg==","signatures":[{"sig":"MEYCIQDePl4EJLnGhymCrJZ1xvtwZwUc9wsB0XQ7ETatkH0WgQIhALyapPiYYsyWE9XF8V0LgGifhdndTlQc/Hk8XTeYhmSL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"0.0.0"}},"0.0.3":{"name":"gl-shader-core","version":"0.0.3","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@0.0.3","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"3387147413b99591f7d114df3183f7ad977649fc","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-0.0.3.tgz","integrity":"sha512-Pv4hzcUtVtAh/7BifX7KbE8TaKgS721sLfB+KOmO5/uaUHWSsrJyAN0n5FX40tP4epx8rt1t6lkLWMpWAGV+PA==","signatures":[{"sig":"MEQCIAOD4DSx53YzUe6pjPeb6v0cwSCmZAfEO5KfEIHlb0HxAiAJTQYSqFHvLGLDEacupHsMiyCYppfj3T0zjPJhUZaZfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"0.0.0"}},"1.0.0":{"name":"gl-shader-core","version":"1.0.0","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@1.0.0","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"76d1e4ab45795618abe9be84e97b182300c45f92","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-1.0.0.tgz","integrity":"sha512-Oc/AYmriXyA0bWIxZHE0DHTVLDZqIXHDmZoUu7RzO6qRum+W+bFzL0zy8asF9x7EmBwrpecvnHrCIDe09x/wZA==","signatures":[{"sig":"MEUCIQCfdGFRlb0SC3DSVhBuMs1QXy27fyHeRrJR5vVALtmNpgIgcPcoBEGlcmczQ2y/VjsR5qgw3EYC9gbkd3iKvcZFuzk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"0.0.0"}},"1.1.0":{"name":"gl-shader-core","version":"1.1.0","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@1.1.0","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"697a0d47eae18f0fbac7db64c4cf5ab005e64d47","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-1.1.0.tgz","integrity":"sha512-bFC1rb6xo+Bj7Nfx73Y6CpE6opBxYZ96GP4IYnBSSgiG1/a64hylAnuk/Z6+uw37hmAvUuwezD1dD2MP8rg8cg==","signatures":[{"sig":"MEUCIQCqrt1NSSeCAsJmuZ6yOSLOLXh/3YV6n3Uns866GmVR5QIgX3Q67Ekr8grxjttcITpTxT3pJCAe1aCZBfRSWSvvyIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^0.0.0"}},"2.0.0":{"name":"gl-shader-core","version":"2.0.0","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@2.0.0","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"4b2ed810a7922c3f2846fad32f58c04049a0c952","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-2.0.0.tgz","integrity":"sha512-eX9PuAdVRn013iAZ+BVZjuou7dDyLV7Yqm+0g//Gu3inv+iOCgnJgUZ2R2uile9tYDs2pxjKv+saYaMoVBKtVw==","signatures":[{"sig":"MEUCIDOPPDjkREOilbEWr3c1NorjAk0mbBC2P368ZCQ1SYj4AiEA2j4QTWfCDqQPG/O1iDJelQ27CKV0tasRzm35FcBeJU4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.3.14","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^0.0.0"}},"2.0.1":{"name":"gl-shader-core","version":"2.0.1","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@2.0.1","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"efa73aebb939bfe7162c87b1e56e90909cb36d83","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-2.0.1.tgz","integrity":"sha512-vkzsNnoq0OFVBVCQ9naZIkHusw3HePeHrEvXLD9RSk53T8BZLpiV6cWNtf+nOep6sTCLMWDZQdTQhKlQkdr3cQ==","signatures":[{"sig":"MEUCIEl++PuWPYg0/GU6oS7o5zd01qNhGkEqCObPCMAEvX/gAiEAqBpQFHXiUCEBVLsMD8jDEEjmZUtCL5Oskc7m/o5Zet4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.4.3","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^1.0.0"}},"2.1.0":{"name":"gl-shader-core","version":"2.1.0","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@2.1.0","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"c38df6daa41a18da4277d3bf1ddfb7183321dba7","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-2.1.0.tgz","integrity":"sha512-pvTpBlYlCutuXL2fz7vkWB7DtnDYrcVtpqGgRTwNj0cKjlbwMqY7moWCY73XzYRO5N6QOWb+dKdNnBjxP3lvZQ==","signatures":[{"sig":"MEQCIG2BVEe0Twk0jtesHaKfp30Ljce13CdH+5erdFD1ZH0YAiArVB0L1uBrxqyR1pRbUQx9ZgehWUtTvvDSGnTOeAYhFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.4.3","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^1.0.0"}},"2.1.1":{"name":"gl-shader-core","version":"2.1.1","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@2.1.1","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"2b7f0fc1ace08bc44e54486482019a5c874d1cda","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-2.1.1.tgz","integrity":"sha512-GPDJmzSin88YgVWQGt+6zrOxwK1zRMynVynxBxyA38/c7k8C9Cv/P7tg02oHHP2Pg5rKkPLktmDz/8SlFsPBhw==","signatures":[{"sig":"MEYCIQD9t9AwXOMwsNmaOGsXuDEVk2Cte8MBQCaYFUU6iFNjCAIhAO8IojOsERzxE2gQXcVvVJWSSdgAHAL56y1WV/bV/7bc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.4.3","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^1.0.0"}},"2.1.2":{"name":"gl-shader-core","version":"2.1.2","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@2.1.2","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"chrisdickinson","email":"chris@neversaw.us"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"d01543df68dd4d9bb20327b06f6aa3aa0679d395","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-2.1.2.tgz","integrity":"sha512-btmcsvtTMILsCSnEG5xU39fFlVf4RAZwVXgw8ERMqiJwlkgVCH1LzEO9cV05Y+Z4Sz560tI+HNqjzpRwqaTKIw==","signatures":[{"sig":"MEUCIQCPJP0JGS4+UzeDDLYuzPpCstZfcdKvJAMxhiC7HINt/AIgWRMvuZdY6lNKNbVvL4ho61nYEiuL7TrjpigLS3eq4h8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.4.3","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^1.0.0"}},"2.2.0":{"name":"gl-shader-core","version":"2.2.0","keywords":["webgl","shader"],"author":{"name":"Mikola Lysenko"},"license":"MIT","_id":"gl-shader-core@2.2.0","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"chrisdickinson","email":"chris@neversaw.us"}],"homepage":"https://github.com/mikolalysenko/gl-shader-core","bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"dist":{"shasum":"e4788ebd135ce0d1ec52fdbc42800a2b98879e03","tarball":"https://registry.npmjs.org/gl-shader-core/-/gl-shader-core-2.2.0.tgz","integrity":"sha512-2BBP/nl/oR0fQA1bHWnIcFmy0E+Swlvp7ivalbWzAb6gnKZtTGmELJWW9zneIdcoxVs/vjAmbhOQXRd3cK4lFg==","signatures":[{"sig":"MEUCIEIwlSqoXsKV9xp5/6wDNZFattLPviRpJAPF59CLY+ShAiEAhX9J1fvDamlHj+AQcUb/NmGvaQxrdZOkJ4bDc45Pbt8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"shader-core.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"_npmVersion":"1.4.3","description":"Core implementation of gl-shader without parser dependencies","directories":{},"dependencies":{"dup":"^1.0.0"}}},"time":{"created":"2013-12-29T03:59:51.053Z","modified":"2024-12-29T00:46:44.335Z","0.0.0":"2013-12-29T03:59:51.940Z","0.0.1":"2014-01-28T15:23:23.379Z","0.0.2":"2014-02-01T16:39:23.831Z","0.0.3":"2014-02-01T17:21:40.560Z","1.0.0":"2014-02-02T22:43:57.884Z","1.1.0":"2014-02-04T02:04:16.541Z","2.0.0":"2014-02-06T05:06:13.236Z","2.0.1":"2014-05-07T21:03:09.246Z","2.1.0":"2014-06-03T01:33:57.125Z","2.1.1":"2014-07-01T21:04:38.270Z","2.1.2":"2014-09-21T14:40:44.357Z","2.2.0":"2014-09-27T22:26:38.109Z"},"bugs":{"url":"https://github.com/mikolalysenko/gl-shader-core/issues"},"author":{"name":"Mikola Lysenko"},"license":"MIT","homepage":"https://github.com/mikolalysenko/gl-shader-core","keywords":["webgl","shader"],"repository":{"url":"git://github.com/mikolalysenko/gl-shader-core.git","type":"git"},"description":"Core implementation of gl-shader without parser dependencies","maintainers":[{"email":"mikolalysenko@gmail.com","name":"mikolalysenko"},{"email":"wwwtyro@gmail.com","name":"wwwtyro"},{"email":"thibaut.seguy@gmail.com","name":"thibauts"},{"email":"me@mikkoh.com","name":"mikkoh"},{"email":"javascript@yosh.is","name":"yoshuawuyts"},{"email":"dave.des@gmail.com","name":"mattdesl"},{"email":"hughskennedy@gmail.com","name":"hughsk"},{"email":"chris@neversaw.us","name":"chrisdickinson"},{"email":"tatum.creative@gmail.com","name":"tatumcreative"}],"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","readmeFilename":"README.md","users":{"yolk":true,"0x4c3p":true,"plitat":true}}