ambient-section-particles
Fungsinya
Skill ini memandu agent AI menambahkan efek partikel yang ringan dan terbatas pada sebagian halaman web. Cocok untuk desainer yang menginginkan suasana tertentu, seperti salju atau kelopak bunga, sambil tetap menjaga teks mudah dibaca.
Kapan dipakai
- ✓Saat suatu bagian membutuhkan efek suasana yang lembut seperti salju, daun, atau percikan api.
- ✓Saat Anda menginginkan partikel yang sedikit bereaksi pada mouse tanpa menghalangi klik.
- ✓Saat efek harus berhenti di perangkat lambat dan untuk pengunjung yang lebih suka gerakan terbatas.
Link skill
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/ambient-section-particles/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Tambahkan beberapa kelopak bunga yang jatuh dengan lembut di bagian header halaman obral musim semi saya, tetapi tetap jaga teksnya jelas.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memilih metode gambar yang sederhana, menetapkan jumlah partikel yang moderat, dan menempatkannya di belakang konten. Efek dijeda saat tidak terlihat, dan versi diam disediakan untuk pengunjung dengan gerakan terbatas.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
- Give the section a positioning context and clip overflow when particles should remain bounded.
- Place the particle surface behind content but above the background.
- Set the layer to
pointer-events: none; listen for pointer movement on the section. - Reserve a quiet content zone or lower density behind long text and controls.
- 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
requestAnimationFrameloop for the whole layer. - Resize with
ResizeObserver; cap canvas backing resolution atmin(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.
Pertanyaan umum
Apakah partikel akan menghalangi tombol?
Tidak. Skill ini mengatur lapisan agar event penunjuk tetap melewatinya, dan meminta area tenang di belakang teks panjang.
Berapa banyak partikel yang dipakai?
Jumlahnya mengikuti luas bagian tersebut dan dibatasi untuk ponsel serta perangkat hemat daya.
Bisakah saya memakai bentuk merek saya?
Bisa. Skill ini mengizinkan bentuk seperti ikon atau potongan merek, selama mendukung suasana bagian tersebut.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 7.2k
- Peringkat
- #13395
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- …
Skill lain dari repositori ini
3d-cloth-material
7.2kMembantu agent Anda membuat kain tenun yang realistis di Three.js, dengan anyaman benang, kilau lembut, lipatan alami, kelim, dan jahitan.
3d-falling-leaves
7.2kMembantu agent Anda menambahkan daun berguguran yang realistis ke scene 3D, dengan daun yang berputar, terbawa angin, dan digunakan ulang saat kamera bergerak.
3d-four-seasons
7.2kMembantu agent Anda menambahkan tampilan musim semi, panas, gugur, dan dingin ke scene 3D, dengan mengubah dedaunan, cahaya, langit, dan salju tanpa membangun ulang scene.
3d-high-poly-models
7.2kMembantu agent Anda membangun model 3D yang detail dengan bentuk halus dan tepi yang meyakinkan, lalu menyiapkan versi lebih ringan yang berjalan baik di web.
Skill serupa
angular-developer
280kMembantu agent Anda membuat kode Angular dan memberi saran struktur proyek. Berguna saat memulai proyek baru, membuat komponen, atau meningkatkan performa.
frontend-a11y
280kMembantu agent Anda membuat antarmuka web dapat diakses semua orang. Memastikan website dan aplikasi berfungsi baik dengan screen reader dan navigasi keyboard.
frontend-patterns
280kMembuat agent Anda menerapkan pola modern dalam frontend. Mengoptimalkan performa, mengelola state, dan mengikuti praktik terbaik React dan Next.js.