Aller au contenu
Skillpedia
Images et icônes101k · #1061

webgl-particle-galaxy

Ce qu’il fait

Crée une animation visuellement saisissante de milliers de points lumineux qui tournent ensemble, comme une galaxie. Tout se passe directement dans votre navigateur, sans rien télécharger.

Quand l’utiliser

  • ✓Pour créer un arrière-plan animé et futuriste pour un site web.
  • ✓Pour présenter des effets visuels complexes sur une page web.
  • ✓Lorsque vous avez besoin d'un élément visuel accrocheur et techniquement intéressant.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-particle-galaxy/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Créez une galaxie de particules en rotation pour l'arrière-plan de mon site web.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Il utilise une technologie appelée WebGL pour dessiner des milliers de points directement sur la carte graphique de votre ordinateur. Ces points se déplacent sur des orbites calculées en temps réel, ce qui crée l'effet de galaxie.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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.
Questions fréquentes

Que sont les « particules » dans ce contexte ?

Ce sont simplement de petits points de lumière ou de couleur qui, ensemble, forment l'image de la galaxie.

Pourquoi est-ce rapide ?

Parce que le calcul du mouvement de chaque point est effectué par la carte graphique (GPU), qui est beaucoup plus rapide que le processeur (CPU) pour ce type de tâche.

Faut-il installer quelque chose ?

Non, tout fonctionne directement dans votre navigateur web récent.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
101k
Position au classement
#1061
Licence
Apache-2.0
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires