Prism
MITA beam of light that fans out and splits into a slowly-rotating rainbow past a controllable point. Transparent background — composite over a dark layer.
Cargando shader…
Ajústalo
0.04
1.6
0.15
0.6
0.7
0.12
0.95
0.1
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-prism.json
Crea components/bastard/ShaderPrism.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderPrism from '@/components/bastard/ShaderPrism';23export default function Demo() {4 return (5 <ShaderPrism6 beamWidth={0.04}7 intensity={1.6}8 beamColor="#ffffff"9 startFalloff={0.15}10 endFalloff={0.6}11 spread={0.7}12 softness={0.12}13 saturation={0.95}14 speed={0.1}15 />16 );17}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| beamWidth | number | 0.04 | Beam Width |
| intensity | number | 1.6 | Intensity |
| beamColor | string | "#ffffff" | Beam Color |
| startFalloff | number | 0.15 | Start Falloff |
| endFalloff | number | 0.6 | End Falloff |
| spread | number | 0.7 | Spread |
| softness | number | 0.12 | Softness |
| saturation | number | 0.95 | Saturation |
| speed | number | 0.1 | Hue Speed |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Prism · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.