본문으로 건너뛰기
Skillpedia
이미지 및 아이콘101k · #1061

webgl-particle-galaxy

하는 일

함께 도는 수천 개의 밝은 점이 은하처럼 보이는 놀라운 애니메이션을 만듭니다. 모든 것이 다운로드 없이 브라우저에서 바로 실행됩니다.

사용하는 경우

  • ✓웹사이트의 미래적인 애니메이션 배경을 만들 때.
  • ✓웹 페이지에서 복잡한 시각 효과를 보여 줄 때.
  • ✓눈길을 끌고 기술적으로 흥미로운 시각 요소가 필요한 경우.

스킬 링크

https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-particle-galaxy/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-particle-galaxy/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 via gl_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 #63fe13 for 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 webgl2 is unavailable.
자주 묻는 질문

이 맥락에서 '입자'는 무엇인가요?

은하 이미지를 이루는 작은 빛이나 색의 점일 뿐입니다.

왜 빠른가요?

각 점의 움직임 계산을 그래픽카드(GPU)가 처리하는데, 이런 작업은 메인 프로세서(CPU)보다 훨씬 빠르기 때문입니다.

무언가 설치해야 하나요?

아니요. 모든 것이 최신 웹 브라우저에서 바로 실행됩니다.

상세 정보

작성자의 원본 설명

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬