Godray Haze
Web (React)
Volumetric light rays through a hazy gradient sky.
Volumetric god rays streaming from the top corner over a sky gradient, with soft fractal haze and a vignette. It fills its positioned parent and freezes its animation when the user prefers reduced motion. Built on the shaders library (MIT) and rendered with WebGPU.
Godray Haze
Installation
CLI
npx @modus-ui/cli add godray-hazeManual
- Install
shaderswithnpm install shaders. - Copy the code from the component tab.
- Create a file at
components/ui/godray-haze.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
rayColor | string | "#fde68a" | Colour of the light rays. |
skyColor | string | "#1e293b" | Top colour of the sky gradient. |
groundColor | string | "#020617" | Bottom colour and vignette tint. |
speed | number | 0.5 | Ray animation speed. |
intensity | number | 0.6 | Brightness of the rays. |
density | number | 0.3 | Density of the rays. |
spotty | number | 1 | How broken up the rays are. |
Comments