Docs/Efectos

Pixel Throw

MIT

Throws pixels along the cursor's path like a fluid — brighter (or redder/greener/bluer) pixels are flung farther, then settle back with friction

Cargando shader…

Ajústalo

0.25
0.8
0.2
0.3
0.5

Instalación

Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-pixel-throw.json

Crea components/bastard/ShaderPixelThrow.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderPixelThrow from '@/components/bastard/ShaderPixelThrow';
2
3export default function Demo() {
4 return (
5 <ShaderPixelThrow
6 throwKey="luminance"
7 strength={0.25}
8 keyInfluence={0.8}
9 radius={0.2}
10 friction={0.3}
11 momentum={0.5}
12 edges="stretch"
13 />
14 );
15}

Props

PropTipoPor defectoDescripción
throwKey'luminance' | 'darkness' | 'red' | 'green' | 'blue'"luminance"Throw By
strengthnumber0.25Strength
keyInfluencenumber0.8Key Influence
radiusnumber0.2Radius
frictionnumber0.3Friction
momentumnumber0.5Momentum
edges'stretch' | 'transparent' | 'mirror' | 'wrap'"stretch"Edges

Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.

Créditos

Basado en Pixel Throw · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.