Docs/Efectos

Pixel Sort

MIT

Pixels sort by brightness around the cursor and keep their sorted position, optionally decaying back over time

Cargando shader…

Ajústalo

0.4
1
0.1
0.1

Instalación

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

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

Uso

Demo.tsx
1import ShaderPixelSort from '@/components/bastard/ShaderPixelSort';
2
3export default function Demo() {
4 return (
5 <ShaderPixelSort
6 radius={0.4}
7 falloff={1}
8 strength={0.1}
9 decay={0.1}
10 axis="vertical"
11 direction="descending"
12 />
13 );
14}

Props

PropTipoPor defectoDescripción
radiusnumber0.4Radius
falloffnumber1Falloff
strengthnumber0.1Strength
decaynumber0.1Decay
axis'horizontal' | 'vertical'"vertical"Axis
direction'ascending' | 'descending'"descending"Direction

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

Créditos

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