React Usage
Vanilla JavaScript Usage
Parameters
string[]
default:"['#121212', '#9470ff', '#121212', '#8838ff']"
Array of up to 10 gradient colors in hex format. Colors are blended based on the underlying pattern.
number
default:"0.45"
Blend point between colors, where 0.5 equals equal distribution. Range: 0 to 1.
number
default:"1"
Color transition sharpness. 0 creates hard edges, 1 creates smooth gradients. Range: 0 to 1.
'checks' | 'stripes' | 'edge'
default:"'checks'"
Base pattern type:
checks: Checkerboard patternstripes: Horizontal stripesedge: Split edge pattern
number
default:"0.1"
Zoom level of the base pattern. Range: 0 to 1.
number
default:"0.25"
Strength of noise-based distortion applied to the pattern. Range: 0 to 1.
number
default:"0.8"
Strength of the swirl distortion effect. Range: 0 to 1.
number
default:"10"
Number of layered swirl passes. Only effective when swirl > 0. Range: 0 to 20.
number
default:"1"
Animation speed multiplier. Set to 0 to pause animation.
number
default:"0"
Specific frame to display when speed is 0.
Common Sizing Parameters
number
default:"1"
Overall zoom level of the graphics. Range: 0.01 to 4.
number
default:"0"
Rotation angle in degrees. Range: 0 to 360.
'none' | 'contain' | 'cover'
default:"'contain'"
How to fit the shader into the canvas dimensions.
number
default:"0"
Horizontal offset of the graphics center. Range: -1 to 1.
number
default:"0"
Vertical offset of the graphics center. Range: -1 to 1.
Presets
The Warp shader comes with several built-in presets:- Default: Purple and black checkerboard with moderate swirl
- Cauldron: Green, blue, and dark tones with edge pattern
- Ink: High contrast black and white with sharp edges
- Kelp: Organic green stripes with minimal swirl
- Nectar: Warm golden tones with edge pattern
- Passion: Deep red and orange with checks pattern
