Carbon Fiber
MITPhotorealistic woven carbon fibre — interlaced tows whose anisotropic sheen flips ninety degrees cell to cell, raised into a quilted weave and finished with a glossy clearcoat that mirrors the studio. Plain or twill, in any shape.
Cargando shader…
Ajústalo
1
0
30
0
0.5
1.2
0.5
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-carbon-fiber.json
Crea components/bastard/ShaderCarbonFiber.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderCarbonFiber from '@/components/bastard/ShaderCarbonFiber';23export default function Demo() {4 return (5 <ShaderCarbonFiber6 scale={1}7 rotation={0}8 lightColor="#b9bdc6"9 darkColor="#0b0c0e"10 weaveStyle="twill"11 weaveScale={30}12 weaveAngle={0}13 relief={0.5}14 fiberSheen={1.2}15 roughness={0.5}16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| scale | number | 1 | Scale |
| rotation | number | 0 | Rotation |
| lightColor | string | "#b9bdc6" | Fiber Sheen |
| darkColor | string | "#0b0c0e" | Resin Color |
| weaveStyle | 'twill' | 'plain' | "twill" | Weave |
| weaveScale | number | 30 | Weave Scale |
| weaveAngle | number | 0 | Weave Angle |
| relief | number | 0.5 | Weave Depth |
| fiberSheen | number | 1.2 | Fiber Sheen |
| roughness | number | 0.5 | Roughness |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Carbon Fiber · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.