React Usage
Vanilla JavaScript Usage
Parameters
string
default:"'#000000'"
Background color in hex format.
string
default:"'#0000ff'"
Color overlay blended with the rays in hex format.
string[]
Array of up to 5 ray colors in hex format. Supports alpha channel.
number
default:"0.3"
The number of rays. Higher values create more rays. Range: 0 to 1.
number
default:"0.3"
The length of the rays. Higher values create more spots and shorter rays. Range: 0 to 1.
number
default:"0.8"
Visibility and strength of the rays. Range: 0 to 1.
number
default:"0.2"
Size of the circular glow shape in the center. Range: 0 to 1.
number
default:"0.4"
Brightness and intensity of the central glow. Range: 0 to 1.
number
default:"0.4"
Power of glow effect. 0 uses alpha blending, 1 uses additive blending. Range: 0 to 1.
number
default:"0.75"
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.55"
Vertical offset of the graphics center. Range: -1 to 1.
Presets
The God Rays shader comes with several built-in presets:- Default: Purple and blue rays with bright center
- Warp: Pink, orange, and white with higher density
- Linear: White rays with additive bloom
- Ether: Blue ethereal glow with low density
