extract uniforms and attributes from glsl programs
extract attribute and uniform data from glsl files, no matter how nested.
var extract = require'glsl-extract'extractfscreateReadStream'test.glsl'attributes uniforms = infoforvar def of uniformsname type = def // where "name" is the full dotted, array'd// gl.getUniformLocation lookup path and// type is the declared type.extract"also works with just text"// should execute on same frame.
Given a readable stream, string, or buffer, return a continuable that will trigger
parsing. The continuable will call its callback with
err (if any), and
data is comprised of
A GLSLLocation is just a plain object containing
name (the appropriate name to
type (one of the primitive GLSL types).