Overview
Shader Toy Viewer is a component that renders interactive GLSL shaders from ShaderToy in the browser using WebGL. Features adjustable color controls and mouse interaction modes.Usage
API Reference
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
shaderCode | string | - | GLSL fragment shader source code from ShaderToy. |
mouseMode | 'click' | 'hover' | 'click' | Mouse tracking mode: either on click or continuous hover. |
hue | number | 0 | Adjust the hue of the shader output. |
saturation | number | 1 | Adjust the saturation of the shader output. |
brightness | number | 1 | Adjust the brightness of the shader output. |
speed | number | 1 | Adjust the speed of the shader output. |
class | string | - | Custom classes to apply to the container. |
Dependencies
- ogl