Shatter
MITBroken glass effect with tectonic plate displacement
Cargando shader…
Ajústalo
1
4
0.4
1
2
1
5
0.1
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-shatter.json
Crea components/bastard/ShaderShatter.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderShatter from '@/components/bastard/ShaderShatter';23export default function Demo() {4 return (5 <ShaderShatter6 crackWidth={1}7 intensity={4}8 radius={0.4}9 decay={1}10 seed={2}11 chromaticSplit={1}12 refractionStrength={5}13 shardLighting={0.1}14 edges="mirror"15 />16 );17}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| crackWidth | number | 1 | Crack Width |
| intensity | number | 4 | Intensity |
| radius | number | 0.4 | Radius |
| decay | number | 1 | Decay |
| seed | number | 2 | Seed |
| chromaticSplit | number | 1 | Chromatic Split |
| refractionStrength | number | 5 | Refraction |
| shardLighting | number | 0.1 | Shard Lighting |
| edges | 'stretch' | 'transparent' | 'mirror' | 'wrap' | "mirror" | Edges |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Shatter · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.