particles-router
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseParticles Router
Particles Router
Routes to 3 specialized particle system skills based on task requirements.
根据任务需求,路由至3种专门的粒子系统技能。
Routing Protocol
路由协议
- Classify — Identify particle effect type and scale
- Match — Find skill(s) with highest signal match
- Combine — Most particle systems need 2-3 skills together
- Load — Read matched SKILL.md files before implementation
- 分类 — 识别粒子效果的类型和规模
- 匹配 — 找到与信号匹配度最高的技能
- 组合 — 大多数粒子系统需要同时使用2-3种技能
- 加载 — 在实现前阅读匹配的SKILL.md文件
Quick Route
快速路由
Tier 1: Core (Always Consider)
第一层级:核心技能(始终需要考虑)
| Task Type | Skill | Primary Signal Words |
|---|---|---|
| Rendering | | points, instanced, buffer, shader, thousands, performance |
| Motion | | gravity, wind, attract, force, velocity, turbulence, collision |
| Spawning | | emit, spawn, fade, trail, pool, birth, death, age |
| 任务类型 | 技能 | 核心关键词 |
|---|---|---|
| 渲染 | | points, instanced, buffer, shader, thousands, performance |
| 运动 | | gravity, wind, attract, force, velocity, turbulence, collision |
| 生成 | | emit, spawn, fade, trail, pool, birth, death, age |
Signal Matching Rules
信号匹配规则
Priority Order
优先级顺序
When multiple signals present, resolve by priority:
- Performance concern — "millions of particles" → first
particles-gpu - Motion type — "swirling", "attracted to" →
particles-physics - Emission pattern — "burst", "continuous", "trails" →
particles-lifecycle - Default — All three skills usually needed together
当存在多个信号时,按以下优先级处理:
- 性能需求 — "millions of particles" → 优先选择
particles-gpu - 运动类型 — "swirling", "attracted to" → 选择
particles-physics - 发射模式 — "burst", "continuous", "trails" → 选择
particles-lifecycle - 默认情况 — 通常需要同时使用这三种技能
Confidence Scoring
置信度评分
- High (3+ signals) — Route immediately
- Medium (1-2 signals) — Include all three skills (typical)
- Low (0 signals) — Ask: "Describe the particle effect you want"
- 高置信度(3个及以上信号) — 直接路由
- 中置信度(1-2个信号) — 包含全部三种技能(常规情况)
- 低置信度(0个信号) — 询问:"Describe the particle effect you want"
Common Combinations
常见组合
Basic Particle System (All 3 skills)
基础粒子系统(三种技能全用)
particles-gpu → Buffer setup, shader rendering
particles-physics → Gravity, basic motion
particles-lifecycle → Emission, fade outWiring: GPU provides rendering foundation, lifecycle handles spawning/death, physics adds motion.
particles-gpu → Buffer setup, shader rendering
particles-physics → Gravity, basic motion
particles-lifecycle → Emission, fade out关联逻辑:GPU提供渲染基础,lifecycle处理粒子的生成/消亡,physics添加运动效果。
Snow/Rain Effect (3 skills)
雨雪效果(三种技能全用)
particles-gpu → Points with texture
particles-physics → Gravity, wind, turbulence
particles-lifecycle → Continuous emission, recyclingWiring: Lifecycle emits continuously, physics handles falling + drift, GPU renders efficiently.
particles-gpu → Points with texture
particles-physics → Gravity, wind, turbulence
particles-lifecycle → Continuous emission, recycling关联逻辑:lifecycle持续发射粒子,physics控制下落与漂移,GPU实现高效渲染。
Explosion (3 skills)
爆炸效果(三种技能全用)
particles-gpu → Instanced or points rendering
particles-physics → Radial velocity, drag
particles-lifecycle → Burst emission, fade + shrinkWiring: Lifecycle bursts particles, physics applies outward force + slowdown, GPU handles scale.
particles-gpu → Instanced or points rendering
particles-physics → Radial velocity, drag
particles-lifecycle → Burst emission, fade + shrink关联逻辑:lifecycle爆发式生成粒子,physics施加向外力与减速效果,GPU处理大规模渲染。
Fire/Smoke (3 skills)
火焰/烟雾效果(三种技能全用)
particles-gpu → Custom shader with noise
particles-physics → Upward force, turbulence
particles-lifecycle → Continuous emit, color gradient, size over lifeWiring: Lifecycle manages color/size curves, physics adds flicker motion, GPU renders with blend modes.
particles-gpu → Custom shader with noise
particles-physics → Upward force, turbulence
particles-lifecycle → Continuous emit, color gradient, size over life关联逻辑:lifecycle管理颜色/尺寸曲线,physics添加闪烁运动,GPU使用混合模式渲染。
Swarm/Flock (2-3 skills)
群体/集群效果(2-3种技能)
particles-gpu → Instanced mesh (if 3D shapes)
particles-physics → Attractors, flow fields, separation
particles-lifecycle → (Optional) Population managementWiring: Physics dominates with behavioral forces, GPU handles rendering.
particles-gpu → Instanced mesh (if 3D shapes)
particles-physics → Attractors, flow fields, separation
particles-lifecycle → (Optional) Population management关联逻辑:physics主导行为力控制,GPU负责渲染。
Magic Trail (3 skills)
魔法轨迹效果(三种技能全用)
particles-gpu → Points with glow shader
particles-physics → Follow path, slight randomness
particles-lifecycle → Trail history, fade along lengthWiring: Lifecycle stores position history, GPU renders with alpha gradient.
particles-gpu → Points with glow shader
particles-physics → Follow path, slight randomness
particles-lifecycle → Trail history, fade along length关联逻辑:lifecycle存储位置历史,GPU渲染带透明度渐变的轨迹。
Confetti (3 skills)
彩屑效果(三种技能全用)
particles-gpu → Instanced flat planes
particles-physics → Gravity, tumbling rotation, air resistance
particles-lifecycle → Burst emission, ground collision deathWiring: Physics handles realistic falling, lifecycle manages burst and cleanup.
particles-gpu → Instanced flat planes
particles-physics → Gravity, tumbling rotation, air resistance
particles-lifecycle → Burst emission, ground collision death关联逻辑:physics控制真实下落运动,lifecycle管理爆发生成与清理。
Decision Table
决策表
| Effect Type | GPU Focus | Physics Focus | Lifecycle Focus |
|---|---|---|---|
| Stars/sparkle | Points, static | Minimal | Twinkle (alpha) |
| Snow/rain | Points, texture | Gravity, wind | Continuous, recycle |
| Fire | Shader, blend | Upward, turbulence | Color/size curves |
| Explosion | High count | Radial, drag | Burst, fade |
| Smoke | Soft shader | Rise, curl | Slow fade, grow |
| Swarm | Instanced | Attractors, fields | Spawn/death |
| Trail | Line or points | Path following | Position history |
| Dust | Small points | Brownian | Random spawn |
| 效果类型 | GPU重点 | Physics重点 | Lifecycle重点 |
|---|---|---|---|
| 星星/闪烁 | 点渲染、静态 | 最小化配置 | 闪烁(透明度变化) |
| 雨雪 | 点渲染、纹理 | 重力、风力 | 持续生成、循环利用 |
| 火焰 | 着色器、混合模式 | 上升力、湍流 | 颜色/尺寸曲线 |
| 爆炸 | 高数量渲染 | 径向力、阻力 | 爆发式生成、淡出 |
| 烟雾 | 柔化着色器 | 上升、卷曲 | 缓慢淡出、尺寸增长 |
| 群体 | 实例化渲染 | 吸引子、流场 | 生成/消亡管理 |
| 轨迹 | 线或点渲染 | 路径跟随 | 位置历史存储 |
| 尘埃 | 小点渲染 | 布朗运动 | 随机生成 |
Particle Count Guidelines
粒子数量指南
| Count | Approach | Skills Priority |
|---|---|---|
| < 100 | Simple, any approach | lifecycle > physics > gpu |
| 100 - 1,000 | Points or instanced | All equal |
| 1,000 - 10,000 | GPU-focused | gpu > physics > lifecycle |
| 10,000 - 100,000 | GPU essential | gpu >> physics (shader) > lifecycle |
| > 100,000 | Full GPU/compute | gpu only, physics in shader |
| 数量 | 实现方式 | 技能优先级 |
|---|---|---|
| 少于100个 | 简单实现,任意方式 | lifecycle > physics > gpu |
| 100 - 1,000个 | 点或实例化渲染 | 三者同等重要 |
| 1,000 - 10,000个 | GPU优先 | gpu > physics > lifecycle |
| 10,000 - 100,000个 | 必须使用GPU | gpu >> physics(着色器实现) > lifecycle |
| 超过100,000个 | 全GPU/计算管线 | 仅用gpu,物理效果在着色器中实现 |
Skill Dependencies
技能依赖关系
particles-gpu (rendering foundation)
├── particles-physics (motion layer)
└── particles-lifecycle (management layer)- is always needed for rendering
particles-gpu - and
particles-physicsare independent but complementaryparticles-lifecycle - For simple effects, you might skip physics OR lifecycle, rarely both
particles-gpu (rendering foundation)
├── particles-physics (motion layer)
└── particles-lifecycle (management layer)- 始终是渲染的基础
particles-gpu - 和
particles-physics相互独立但互为补充particles-lifecycle - 对于简单效果,可以跳过physics或lifecycle,但很少同时跳过两者
Fallback Behavior
降级处理逻辑
- Unknown effect → Start with all three skills
- Performance issues → Focus on optimization
particles-gpu - Motion problems → Deep-dive
particles-physics - Spawning/timing issues → Focus on
particles-lifecycle
- 未知效果 → 从三种技能全部启用开始
- 性能问题 → 重点优化
particles-gpu - 运动问题 → 深入排查
particles-physics - 生成/时序问题 → 重点调整
particles-lifecycle
Quick Decision Flowchart
快速决策流程图
User Request
│
▼
┌─────────────────────────┐
│ Rendering particles? │──Yes──▶ particles-gpu (always)
└─────────────────────────┘
│
▼
┌─────────────────────────┐
│ Movement/forces needed? │──Yes──▶ + particles-physics
└─────────────────────────┘
│
▼
┌─────────────────────────┐
│ Birth/death/emission? │──Yes──▶ + particles-lifecycle
└─────────────────────────┘
│
▼
Most effects need all 3 skillsUser Request
│
▼
┌─────────────────────────┐
│ Rendering particles? │──Yes──▶ particles-gpu (always)
└─────────────────────────┘
│
▼
┌─────────────────────────┐
│ Movement/forces needed? │──Yes──▶ + particles-physics
└─────────────────────────┘
│
▼
┌─────────────────────────┐
│ Birth/death/emission? │──Yes──▶ + particles-lifecycle
└─────────────────────────┘
│
▼
Most effects need all 3 skillsEffect Recipes
效果配方
Quick Start Templates
快速启动模板
| Effect | Start With |
|---|---|
| Ambient dust | gpu (points) + lifecycle (continuous) |
| Button sparkle | gpu (points) + lifecycle (burst, fade) |
| Character trail | gpu + lifecycle (trail) |
| Weather | All three |
| Magic spell | All three |
| Data visualization | gpu + lifecycle |
| 效果 | 初始技能组合 |
|---|---|
| 环境尘埃 | gpu (points) + lifecycle (continuous) |
| 按钮闪烁 | gpu (points) + lifecycle (burst, fade) |
| 角色轨迹 | gpu + lifecycle (trail) |
| 天气效果 | 三种技能全用 |
| 魔法特效 | 三种技能全用 |
| 数据可视化 | gpu + lifecycle |
Integration with Other Domains
与其他领域的集成
| Combined With | Use Case |
|---|---|
| Turbulent motion, organic shapes |
| Glow, chromatic aberration on particles |
| Optimization, culling, LOD |
| Scripted particle animations |
| Music-driven particle effects |
| 结合技能 | 使用场景 |
|---|---|
| 湍流运动、有机形态 |
| 粒子发光、色差效果 |
| 性能优化、剔除、LOD |
| 脚本化粒子动画 |
| 音乐驱动的粒子效果 |
Reference
参考资料
See individual skill files for detailed patterns:
/mnt/skills/user/particles-gpu/SKILL.md/mnt/skills/user/particles-physics/SKILL.md/mnt/skills/user/particles-lifecycle/SKILL.md
查看各技能文件获取详细模式:
/mnt/skills/user/particles-gpu/SKILL.md/mnt/skills/user/particles-physics/SKILL.md/mnt/skills/user/particles-lifecycle/SKILL.md