New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

glsl-exports

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glsl-exports

Find all uniforms and attributes in a GLSL shader

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

glsl-exports

Finds all the uniforms and attributes for a fragment shader.

Example

var result = glslGlobals([
  "uniform float a;",
  "attribute vec3 x, y, z;",
  "void main() {",
    "int a = 1;",
    "gl_FragColor = vec4(1, a, 0, 1);",
  "}"
].join("\n"))

console.log(result)

Prints out:

{
  uniforms: { "a": "float" },
  attributes: {
    "x": "vec3",
    "y": "vec3",
    "z": "vec3"
  }
}

Install

npm install glsl-exports

require("glsl-exports")(shader_source)

Finds all the uniforms and attributes

  • shader_source is the source code to a vertex or fragment shader

Returns An object containing two properties

  • uniforms a list of all the uniform variables and their data types
  • attributes a list of all attribute variables in the shader and their data types

Credits

(c) 2013 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 12 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc