webgl-particle-galaxy
ما الذي تفعله
تُنشئ هذه المهارة رسومًا متحركة لآلاف النقاط المضيئة وهي تدور معًا كمجرة. كل ذلك يعمل مباشرة في متصفحك دون الحاجة إلى تنزيل أي شيء.
متى تستخدمها
- ✓عندما تريد خلفية متحركة مستقبلية لموقع إلكتروني.
- ✓عندما تريد عرض تأثيرات بصرية معقدة في صفحة ويب.
- ✓عندما تحتاج إلى عنصر بصري لافت وذي طابع تقني.
رابط المهارة
https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-particle-galaxy/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أنشئ لي مجرة جسيمات دوارة لخلفية موقعي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تستخدم تقنية 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).
هل أحتاج إلى تثبيت أي شيء؟
لا، كل شيء يعمل مباشرة في متصفح الويب الحديث لديك.
التفاصيل
الوصف الأصلي من المؤلف
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
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
sample-plugin
101kيجعل وكيلك ينشئ ملف بيانات وصفية للاختبارات. يساعد على ضمان عمل الكود بشكل صحيح في مواقف مختلفة.
aster-atelier
101kيساعد وكيلك على إنشاء موقع إلكتروني فني بطابع كلاسيكي. يستخدم صورًا أنيقة وسماءً زرقاء وخطوطًا بأسلوب السينما.
audio-jingle
101kيجعل وكيلك ينشئ صوتيات مثل الموسيقى التعريفية القصيرة والمؤثرات الصوتية. يمكنه إنشاء الموسيقى والأصوات وحفظ النتيجة كملف صوتي.
blog-post
101kيساعد وكيلك على كتابة المقالات الطويلة ومقالات المدونات. يتضمن أماكن للصور والاقتباسات ومعلومات الكاتب.
مهارات مشابهة
gifgrep
394kيتيح لوكيلك البحث في مكتبات GIF ومعاينة النتائج وتنزيل ملف GIF، واستخراج إطار ثابت أو شبكة إطارات منه.
meme-maker
394kيتيح لوكيلك اختيار قالب ميم وإضافة عناوينك الخاصة، ثم إنشاء الميم كصورة بصيغة SVG أو PNG.
ios-icon-gen
280kيتيح لوكيلك إنشاء أيقونات لتطبيقات iOS. يستخدم رموز Apple أو أيقونات من مصادر أخرى لإنشاء الملفات الصحيحة.