Irradiance
MITPhotorealistic light spilling around the edge of any 2D, SVG, or 3D shape — any number of movable colored point lights strike the silhouette and the lit edges irradiate their surroundings, gathered in a compute pass with real cast shadows, mixing where they meet and burning to white at the rim
Cargando shader…
Ajústalo
1
0
0.5
1.2
3
1
0.1
0.15
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-irradiance.json
Crea components/bastard/ShaderIrradiance.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderIrradiance from '@/components/bastard/ShaderIrradiance';23export default function Demo() {4 return (5 <ShaderIrradiance6 scale={1}7 rotation={0}8 lightHeight={0.5}9 lightRange={1.2}10 reach={3}11 core={1}12 wrap={0.1}13 shadows14 shadowSoftness={0.15}15 bodyColor="#000000"16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| scale | number | 1 | Scale |
| rotation | number | 0 | Rotation |
| lightHeight | number | 0.5 | Light Height |
| lightRange | number | 1.2 | Range |
| reach | number | 3 | Reach |
| core | number | 1 | Core |
| wrap | number | 0.1 | Wrap |
| shadows | boolean | true | Shadows |
| shadowSoftness | number | 0.15 | Shadow Softness |
| bodyColor | string | "#000000" | Body Color |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Irradiance · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.