Docs/Efectos

Particle Field

MIT

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

PropTipoPor defectoDescripción
countnumber15000Count
depthSource'luminance' | 'luminanceInverted' | 'red' | 'green' | 'blue' | 'saturation' | 'alpha'"luminance"Depth Source
depthnumber0.7Depth
particleShape'dot' | 'square' | 'glow'"dot"Shape
particleSizenumber0.75Particle Size
depthShadingnumber0.6Depth Shading
wobblenumber0.35Wobble
zoomnumber1Zoom
rotationXnumber0Rotate X
rotationYnumber0Rotate 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.