Saltar al contenido
Skillpedia
Sitios e interfaces (frontend)7,2 mil · #13395

ambient-section-particles

Qué hace

Esta skill guía a un agente de IA para añadir un efecto de partículas ligero y delimitado a una parte de una página web. Es para diseñadores que quieren un ambiente, como nieve o pétalos, manteniendo el texto fácil de leer.

Cuándo usarla

  • ✓Cuando una sección necesita un efecto suave de ambiente, como nieve, hojas o chispas.
  • ✓Cuando quieres partículas que reaccionen ligeramente al ratón sin bloquear los clics.
  • ✓Cuando el efecto debe detenerse en dispositivos lentos y para usuarios que prefieren menos movimiento.

Link de la skill

https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/ambient-section-particles/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/ambient-section-particles/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Añade unos pétalos suaves que caigan en la cabecera de mi página de rebajas de primavera, pero que el texto siga claro.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente elige un método de dibujo sencillo, fija un número moderado de partículas y las coloca detrás del contenido. Pausa el efecto cuando no se ve y ofrece una versión estática para los visitantes que prefieren menos movimiento.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Ambient Section Particles

Build particles as a bounded atmosphere layer, not as a page-wide screensaver. Keep the content primary and stop work when the effect cannot be seen.

Choose the renderer

  • Use canvas for roughly 40 or more small particles, frequent motion, pointer forces, or simple procedural shapes.
  • Use DOM or inline SVG for a small count of branded fragments that need individual styling or semantic labels.
  • Use WebGL only for thousands of particles, depth, shaders, or real 3D behavior. Cap device pixel ratio and provide a static fallback.

Start with the least expensive renderer that preserves the desired shape language.

Define one configuration

const particles = {
  count: 54,
  gravity: 7,
  wind: -3,
  sway: 16,
  speed: [8, 18],
  size: [4, 12],
  opacity: [0.18, 0.62],
  rotation: [-0.8, 0.8],
  mode: "recycle",
  pointerRadius: 110,
  maxDpr: 2
};

Scale density by container area, then clamp it for mobile and low-power devices. Do not derive count from viewport width alone.

Layer the section

  1. Give the section a positioning context and clip overflow when particles should remain bounded.
  2. Place the particle surface behind content but above the background.
  3. Set the layer to pointer-events: none; listen for pointer movement on the section.
  4. Reserve a quiet content zone or lower density behind long text and controls.
  5. Keep controls and links in normal DOM stacking with visible focus.

Run the simulation

  • Seed particles inside or just above the container bounds.
  • Update gravity, wind, phase-based sway, rotation, opacity, and position from elapsed time.
  • Clamp large time deltas after background tabs or stalled frames.
  • Use one requestAnimationFrame loop for the whole layer.
  • Resize with ResizeObserver; cap canvas backing resolution at min(devicePixelRatio, maxDpr).
  • For pointer disturbance, apply a small distance-based force and let particles settle back naturally. Never attach a listener per particle.

Support explicit end modes:

  • recycle: return particles above the section after exit.
  • exit: remove particles after they leave the bounds.
  • settle: resolve into a shallow visual pile with a strict height cap.
  • static: render a deterministic still composition.

Stop invisible work

Use IntersectionObserver to start only when the section is visible. Cancel animation frames when it exits or document.hidden becomes true. Resume from the current simulation state instead of spawning a second loop.

On teardown, disconnect observers, remove resize and pointer listeners, cancel the frame, and release renderer resources.

Respect the reader

  • Under prefers-reduced-motion: reduce, render a sparse static arrangement or remove the layer.
  • Keep particles decorative and hidden from assistive technology.
  • Control opacity and contrast so motion never crosses the legibility threshold.
  • Avoid full-screen pointer repulsion, rapid direction changes, flashes, and large objects crossing form controls.
  • Pause decorative motion while a modal or critical task in the section is active when it competes for attention.

Verify

Test entry and exit pausing, background-tab recovery, fast resize, 390/768/1440 widths, device pixel ratio, pointer and touch input, reduced motion, section overflow, content focus, long text, route cleanup, and console errors. Confirm only one animation loop survives repeated mounts.

Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.

Preguntas frecuentes

¿Las partículas bloquearán los botones?

No. La skill configura la capa para que los eventos del puntero la atraviesen, y pide zonas tranquilas detrás de textos largos.

¿Cuántas partículas se usan?

La cantidad depende del área de la sección y tiene un límite para móviles y dispositivos de bajo consumo.

¿Puedo usar mis formas de marca?

Sí. La skill permite formas como iconos o fragmentos de marca, siempre que apoyen el ambiente de la sección.

Detalles

Descripción original del autor

Add a restrained particle atmosphere inside one section with configurable shapes, density, gravity, wind, sway, rotation, recycling or settling, pointer disturbance, visibility pausing, responsive limits, and reduced-motion fallbacks. Use for petals, leaves, snow, sparks, confetti, dots, paper, icons, or brand fragments that support a section's mood without obscuring content.

repo: MengTo/Skills

Popularidad

Estrellas en GitHub
7,2 mil
Posición en el ranking
#13395
Licencia
MIT
Actualizada
1/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas