webgl-particle-galaxy
できること
何千もの明るい点が、銀河のように一緒に回転する、見た目に美しいアニメーションを作成します。すべてブラウザ上で動作するため、ダウンロードは必要ありません。
使う場面
- ✓Webサイトの背景に、未来的なアニメーションを表示したいとき。
- ✓Webページで複雑なビジュアル効果を見せたいとき。
- ✓目を引く、技術的に面白いビジュアル要素が必要なとき。
スキルのリンク
https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-particle-galaxy/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ウェブサイトの背景に、回転するパーティクル銀河を作成してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
WebGLという技術を使い、お使いのパソコンのグラフィックスカード上で、何千もの点を直接描画します。これらの点はリアルタイムで計算された軌道に沿って動き、銀河のような効果を生み出します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
この文脈での「パーティクル」とは何ですか?
光や色の小さな点のことです。それらが集まって、銀河の画像を形作っています。
なぜ速いのですか?
それぞれの点の動きの計算は、グラフィックスカード(GPU)が行います。この種の処理は、メインプロセッサ(CPU)よりもはるかに高速だからです。
何かインストールする必要はありますか?
いいえ、すべて最新のWebブラウザで直接動作します。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 101k
- ランキング
- #1061
- ライセンス
- Apache-2.0
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
sample-plugin
101kエージェントがテスト用のメタデータファイルを作成できるようにします。さまざまな状況でコードが正しく動作することを確認する助けになります。
aster-atelier
101kエージェントが、クラシックな雰囲気のアート系ウェブサイトを作成できるようにします。映画のような雰囲気を出すために、洗練された画像、青い空、セリフ体のフォントを使用します。
audio-jingle
101kエージェントがジングルや効果音などのオーディオを生成できるようにします。音楽や音声を作成し、その結果をオーディオファイルとして保存できます。
blog-post
101kエージェントが長文の記事やブログ記事を書けるようにします。画像、引用、著者情報を入れるスペースも含まれています。