webgl-particle-galaxy
Fungsinya
Membuat animasi yang memukau berupa ribuan titik cahaya yang berputar bersama-sama, seperti sebuah galaksi. Semuanya berjalan langsung di browser Anda tanpa perlu mengunduh apa pun.
Kapan dipakai
- βUntuk membuat latar belakang animasi yang futuristik pada sebuah website.
- βUntuk menampilkan efek visual yang kompleks di halaman web.
- βKetika Anda membutuhkan elemen visual yang menarik perhatian dan menarik secara teknis.
Link skill
https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-particle-galaxy/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
βBuatkan latar belakang website saya berupa galaksi partikel yang berputar.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Kode ini menggunakan teknologi bernama WebGL untuk menggambar ribuan titik langsung di kartu grafis komputer Anda. Titik-titik tersebut bergerak mengikuti orbit yang dihitung secara real-time, sehingga membentuk efek galaksi.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Particle Galaxy Skill
Produce a single self-contained index.html that renders a real-time particle system full-screen, with a clean typographic overlay on top. The signature move: compute each particle's position on the GPU so the CPU never loops over particles.
Why this is a powered artifact
OpenDesign detects getContext('webgl2') and renders this file in powered preview β a cross-origin-isolated iframe with allow-same-origin. The full GPU pipeline is available; you do not need to work around the opaque sandbox.
Resource map
webgl-particle-galaxy/
βββ SKILL.md β you're reading this
βββ example.html β a working 50,000-point WebGL2 galaxy (READ FIRST)
Workflow
Step 0 β Read the reference
Read example.html end to end. Note the shape: no vertex buffer β the vertex shader reads gl_VertexID, hashes it into a stable per-particle seed, and derives a log-spiral orbit with an inner-fast rotation curve. Points are drawn with gl.drawArrays(gl.POINTS, 0, N) in one call, additive-blended (blendFunc(ONE, ONE) with premultiplied color) so overlapping points glow.
Step 1 β Pick the motion
Choose a field the vertex shader can express cheaply from gl_VertexID + uTime:
- Spiral galaxy (default): log-spiral arms, rotation curve
speed β k / (r + Ξ΅), thin disk. - Attractor / flow: curl or a strange-attractor step baked as a closed-form function of time.
- Explosion / reform: interpolate between a seeded start and a target shape on a looping clock.
Step 2 β Build index.html
- One file, zero external requests. Bind a VAO even with no attributes (some drivers require it).
- Point size in the vertex shader (
gl_PointSize), clamped and DPR-aware; soft round sprites viagl_PointCoord+ a gaussian falloff in the fragment shader. - Additive blending on a dark clear color; premultiply the fragment color so
blendFunc(ONE, ONE)reads as glow, not double-exposure. - Compile shaders with error logging (
getShaderInfoLog/getProgramInfoLog) so a typo fails loudly.
Step 3 β Overlay + brand
- Map the accent colors to the active DESIGN.md when one is present; otherwise a restrained dark palette with one vivid accent (the reference uses lime
#63fe13for the arms and a white-blue core). - Headline β€ 15ch plus one supporting line. Never bury the particles behind the text.
Step 4 β Self-review (P0)
- Renders continuously at ~60fps; the FPS badge updates.
- Tens of thousands of points in a single draw call (no per-particle CPU loop).
- No WebGL console errors; program links cleanly.
- Resizes crisply on window resize (no stretching / blur).
- Degrades to a message (not a blank page) if
webgl2is unavailable.
Pertanyaan umum
Apa yang dimaksud dengan 'partikel' dalam konteks ini?
Partikel adalah titik kecil berupa cahaya atau warna yang, jika digabungkan, membentuk gambar galaksi.
Mengapa prosesnya cepat?
Karena perhitungan pergerakan setiap titik dilakukan oleh kartu grafis (GPU), yang jauh lebih cepat untuk jenis tugas ini dibandingkan prosesor utama (CPU).
Apakah saya perlu menginstal sesuatu?
Tidak perlu. Semuanya berjalan langsung di browser web modern Anda.
Detail
Deskripsi asli dari pembuat
A real-time particle galaxy β tens of thousands of additive-blended GPU points spiraling around a bright core, their orbits solved entirely in the vertex shader (from gl_VertexID), so the whole cloud draws in one call. Rendered as a single self-contained `index.html`. Use when the brief asks for a "particle field", "particle galaxy", "point cloud", "instanced points", "starfield", "GPU particles",
repo: nexu-io/open-design
Popularitas
- Bintang GitHub
- 101k
- Peringkat
- #1061
- Lisensi
- Apache-2.0
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
sample-plugin
101kMembuat agent Anda menghasilkan file metadata untuk pengujian. Ini membantu memastikan kode berjalan dengan benar di berbagai situasi.
aster-atelier
101kMembantu agent Anda membuat website artistik dengan tampilan klasik. Menggunakan citra elegan, langit biru, dan font serif untuk nuansa sinematik.
audio-jingle
101kMembuat agent Anda menghasilkan audio seperti jingle dan efek suara. Bisa membuat musik dan suara, lalu menyimpan hasilnya sebagai file audio.
blog-post
101kMembantu agent Anda menulis artikel panjang atau postingan blog. Sudah tersedia ruang untuk gambar, kutipan, dan informasi penulis.
Skill serupa
gifgrep
394kMemungkinkan agent Anda mencari GIF, melihat pratinjau hasil, mengunduh GIF, dan mengambil satu bingkai diam atau lembar kontak darinya.
meme-maker
394kMemungkinkan agent Anda memilih templat meme, menambahkan teks sendiri, dan membuat meme sebagai gambar SVG atau PNG.
ios-icon-gen
280kMemungkinkan agent Anda membuat ikon untuk aplikasi iOS. Menggunakan simbol Apple atau ikon dari sumber lain untuk membuat file yang tepat.