glsl-uniforms-editor
0.5.0 • Public • Published 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...
Package Sidebar
Install
npm i glsl-uniforms-editor
Weekly Downloads