React component with inputs to edit uniforms of a GLSL shader
JavaScript HTML
Latest commit 49746de Sep 25, 2016 @gre 0.5.0
Permalink
Failed to load latest commit information.
example
src
.eslintrc
.gitignore
README.md
package.json

README.md

glsl-uniforms-editor

Usages

glsl-uniforms-editor allows to be Controlled: you have to provide values and an onChange handler to enable the edition.

<GlslUniformsEditor
  types={{ position: "vec2", power: "float" }}
  values={this.state.values}
  onChange={values => this.setState({ values })} />

glsl-uniforms-editor allows to be Uncontrolled: just define a defaultValues:

<GlslUniformsEditor
  types={{ position: "vec2", power: "float" }}
  defaultValues={{ position: [1, 2], power: 0.4 }}
  onChange={console.log.bind(console)} />

This component aims to be customizable, browse all available props.

Example

(click to open)

Used by...