Pular para o conteúdo
Skillpedia
Sites e telas (frontend)7,2 mil · #13395

ambient-section-particles

O que ela faz

Esta skill orienta um agente de IA a acrescentar um efeito de partículas leve e delimitado a uma parte de uma página web. Ela serve para designers que querem um clima, como neve ou pétalas, mantendo o texto fácil de ler.

Quando usar

  • ✓Quando uma seção precisa de um efeito de clima suave, como neve, folhas ou faíscas.
  • ✓Quando você quer partículas que reajam levemente ao mouse sem bloquear cliques.
  • ✓Quando o efeito precisa parar em dispositivos lentos e para visitantes que preferem movimento reduzido.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/ambient-section-particles/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Acrescente algumas pétalas suaves caindo no cabeçalho da minha página de promoção de primavera, mas mantenha o texto claro.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente escolhe um método de desenho simples, define um número moderado de partículas e as posiciona atrás do conteúdo. Pausa o efeito quando ele não pode ser visto e oferece uma versão estática para visitantes com movimento reduzido.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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.

Perguntas frequentes

As partículas bloqueiam botões?

Não. A skill configura a camada para que os eventos de ponteiro passem por ela, e pede áreas de respiro atrás de textos longos.

Quantas partículas são usadas?

A quantidade é proporcional à área da seção e é limitada para celulares e dispositivos de baixo consumo.

Posso usar formas da minha marca?

Sim. A skill permite formas como ícones ou fragmentos da marca, desde que combinem com o clima da seção.

Detalhes

Descrição original do 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

Popularidade

Estrelas no GitHub
7,2 mil
Posição no ranking
#13395
Licença
MIT
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas