{"_id":"glsl-exports","_rev":"5-9231f3efd505ad51ad524fbef89b3c4b","name":"glsl-exports","description":"Find all uniforms and attributes in a GLSL shader","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"glsl-exports","version":"0.0.0","description":"Find all uniforms and attributes in a GLSL shader","main":"index.js","directories":{"test":"test"},"dependencies":{"glsl-parser":"~0.0.5","glsl-tokenizer":"~0.0.8","through":"~2.3.4"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/glsl-exports.git"},"keywords":["glsl","uniform","attribute","variable","declaration","parser"],"author":{"name":"Mikola Lysenko"},"license":"MIT","readmeFilename":"README.md","gitHead":"d3d567310898381ce1086feb36ed1bb5afdd6f3d","bugs":{"url":"https://github.com/mikolalysenko/glsl-exports/issues"},"readme":"glsl-exports\n============\nFinds all the uniforms and attributes for a fragment shader.\n\n## Example\n\n```javascript\nvar result = glslGlobals([\n  \"uniform float a;\",\n  \"attribute vec3 x, y, z;\",\n  \"void main() {\",\n    \"int a = 1;\",\n    \"gl_FragColor = vec4(1, a, 0, 1);\",\n  \"}\"\n].join(\"\\n\"))\n\nconsole.log(result)\n```\n\nPrints out:\n\n```javascript\n{\n  uniforms: { \"a\": \"float\" },\n  attributes: {\n    \"x\": \"vec3\",\n    \"y\": \"vec3\",\n    \"z\": \"vec3\"\n  }\n}\n```\n\n## Install\n\n    npm install glsl-exports\n    \n## `require(\"glsl-exports\")(shader_source)`\nFinds all the uniforms and attributes\n\n* `shader_source` is the source code to a vertex or fragment shader\n\n**Returns** An object containing two properties\n\n* `uniforms` a list of all the uniform variables and their data types\n* `attributes` a list of all attribute variables in the shader and their data types\n\n## Credits\n(c) 2013 Mikola Lysenko. MIT License","_id":"glsl-exports@0.0.0","dist":{"shasum":"ef700495ef1071a06271262b7fc6f121221fe2ea","tarball":"https://registry.npmjs.org/glsl-exports/-/glsl-exports-0.0.0.tgz","integrity":"sha512-rO8YOfcxMoKjTTaBQHyxdzkgkveuPC/Hyi0MXYuY4m3IMjvnlv2FonYPoZAocJv40QygzVW1/BBpGGDOO/4h0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6uSYRTAWH+fygQ7nNfJKfTpnYGlUpz3ftclNoCw2AXAiB9SsP9Ia1t8K7ipqhWSN2a2eDXA/vdVcnUh+QtKpAmww=="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]}},"readme":"glsl-exports\n============\nFinds all the uniforms and attributes for a fragment shader.\n\n## Example\n\n```javascript\nvar result = glslGlobals([\n  \"uniform float a;\",\n  \"attribute vec3 x, y, z;\",\n  \"void main() {\",\n    \"int a = 1;\",\n    \"gl_FragColor = vec4(1, a, 0, 1);\",\n  \"}\"\n].join(\"\\n\"))\n\nconsole.log(result)\n```\n\nPrints out:\n\n```javascript\n{\n  uniforms: { \"a\": \"float\" },\n  attributes: {\n    \"x\": \"vec3\",\n    \"y\": \"vec3\",\n    \"z\": \"vec3\"\n  }\n}\n```\n\n## Install\n\n    npm install glsl-exports\n    \n## `require(\"glsl-exports\")(shader_source)`\nFinds all the uniforms and attributes\n\n* `shader_source` is the source code to a vertex or fragment shader\n\n**Returns** An object containing two properties\n\n* `uniforms` a list of all the uniform variables and their data types\n* `attributes` a list of all attribute variables in the shader and their data types\n\n## Credits\n(c) 2013 Mikola Lysenko. MIT License","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"time":{"modified":"2022-06-18T13:00:37.930Z","created":"2013-06-12T06:02:00.373Z","0.0.0":"2013-06-12T06:02:01.805Z"},"author":{"name":"Mikola Lysenko"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/glsl-exports.git"}}