Docs/Formas

Carbon Fiber

MIT

Photorealistic 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';
2
3export default function Demo() {
4 return (
5 <ShaderCarbonFiber
6 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

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
lightColorstring"#b9bdc6"Fiber Sheen
darkColorstring"#0b0c0e"Resin Color
weaveStyle'twill' | 'plain'"twill"Weave
weaveScalenumber30Weave Scale
weaveAnglenumber0Weave Angle
reliefnumber0.5Weave Depth
fiberSheennumber1.2Fiber Sheen
roughnessnumber0.5Roughness

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.