Particle Field
MITExplodes the child content into a breathing 3D field of particles — bright areas float toward you and dark areas recede, the whole relief can be orbited with the camera rotations, and the cursor physically throws particles that spring back home
Cargando shader…
Ajústalo
15000
0.7
0.75
0.6
0.35
1
0
0
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-particle-field.json
Crea components/bastard/ShaderParticleField.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderParticleField from '@/components/bastard/ShaderParticleField';23export default function Demo() {4 return (5 <ShaderParticleField6 count={15000}7 depthSource="luminance"8 depth={0.7}9 particleShape="dot"10 particleSize={0.75}11 depthShading={0.6}12 wobble={0.35}13 zoom={1}14 rotationX={0}15 rotationY={0}16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| count | number | 15000 | Count |
| depthSource | 'luminance' | 'luminanceInverted' | 'red' | 'green' | 'blue' | 'saturation' | 'alpha' | "luminance" | Depth Source |
| depth | number | 0.7 | Depth |
| particleShape | 'dot' | 'square' | 'glow' | "dot" | Shape |
| particleSize | number | 0.75 | Particle Size |
| depthShading | number | 0.6 | Depth Shading |
| wobble | number | 0.35 | Wobble |
| zoom | number | 1 | Zoom |
| rotationX | number | 0 | Rotate X |
| rotationY | number | 0 | Rotate Y |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Particle Field · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.