Docs/Formas

Irradiance

MIT

Photorealistic 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';
2
3export default function Demo() {
4 return (
5 <ShaderIrradiance
6 scale={1}
7 rotation={0}
8 lightHeight={0.5}
9 lightRange={1.2}
10 reach={3}
11 core={1}
12 wrap={0.1}
13 shadows
14 shadowSoftness={0.15}
15 bodyColor="#000000"
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
lightHeightnumber0.5Light Height
lightRangenumber1.2Range
reachnumber3Reach
corenumber1Core
wrapnumber0.1Wrap
shadowsbooleantrueShadows
shadowSoftnessnumber0.15Shadow Softness
bodyColorstring"#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.