particles-router

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Particles Router

Particles Router

Routes to 3 specialized particle system skills based on task requirements.
根据任务需求,路由至3种专门的粒子系统技能。

Routing Protocol

路由协议

  1. Classify — Identify particle effect type and scale
  2. Match — Find skill(s) with highest signal match
  3. Combine — Most particle systems need 2-3 skills together
  4. Load — Read matched SKILL.md files before implementation
  1. 分类 — 识别粒子效果的类型和规模
  2. 匹配 — 找到与信号匹配度最高的技能
  3. 组合 — 大多数粒子系统需要同时使用2-3种技能
  4. 加载 — 在实现前阅读匹配的SKILL.md文件

Quick Route

快速路由

Tier 1: Core (Always Consider)

第一层级:核心技能(始终需要考虑)

Task TypeSkillPrimary Signal Words
Rendering
particles-gpu
points, instanced, buffer, shader, thousands, performance
Motion
particles-physics
gravity, wind, attract, force, velocity, turbulence, collision
Spawning
particles-lifecycle
emit, spawn, fade, trail, pool, birth, death, age
任务类型技能核心关键词
渲染
particles-gpu
points, instanced, buffer, shader, thousands, performance
运动
particles-physics
gravity, wind, attract, force, velocity, turbulence, collision
生成
particles-lifecycle
emit, spawn, fade, trail, pool, birth, death, age

Signal Matching Rules

信号匹配规则

Priority Order

优先级顺序

When multiple signals present, resolve by priority:
  1. Performance concern — "millions of particles" →
    particles-gpu
    first
  2. Motion type — "swirling", "attracted to" →
    particles-physics
  3. Emission pattern — "burst", "continuous", "trails" →
    particles-lifecycle
  4. Default — All three skills usually needed together
当存在多个信号时,按以下优先级处理:
  1. 性能需求 — "millions of particles" → 优先选择
    particles-gpu
  2. 运动类型 — "swirling", "attracted to" → 选择
    particles-physics
  3. 发射模式 — "burst", "continuous", "trails" → 选择
    particles-lifecycle
  4. 默认情况 — 通常需要同时使用这三种技能

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 out
Wiring: 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, recycling
Wiring: 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 + shrink
Wiring: 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 life
Wiring: 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 management
Wiring: 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 length
Wiring: 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 death
Wiring: 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 TypeGPU FocusPhysics FocusLifecycle Focus
Stars/sparklePoints, staticMinimalTwinkle (alpha)
Snow/rainPoints, textureGravity, windContinuous, recycle
FireShader, blendUpward, turbulenceColor/size curves
ExplosionHigh countRadial, dragBurst, fade
SmokeSoft shaderRise, curlSlow fade, grow
SwarmInstancedAttractors, fieldsSpawn/death
TrailLine or pointsPath followingPosition history
DustSmall pointsBrownianRandom spawn
效果类型GPU重点Physics重点Lifecycle重点
星星/闪烁点渲染、静态最小化配置闪烁(透明度变化)
雨雪点渲染、纹理重力、风力持续生成、循环利用
火焰着色器、混合模式上升力、湍流颜色/尺寸曲线
爆炸高数量渲染径向力、阻力爆发式生成、淡出
烟雾柔化着色器上升、卷曲缓慢淡出、尺寸增长
群体实例化渲染吸引子、流场生成/消亡管理
轨迹线或点渲染路径跟随位置历史存储
尘埃小点渲染布朗运动随机生成

Particle Count Guidelines

粒子数量指南

CountApproachSkills Priority
< 100Simple, any approachlifecycle > physics > gpu
100 - 1,000Points or instancedAll equal
1,000 - 10,000GPU-focusedgpu > physics > lifecycle
10,000 - 100,000GPU essentialgpu >> physics (shader) > lifecycle
> 100,000Full GPU/computegpu only, physics in shader
数量实现方式技能优先级
少于100个简单实现,任意方式lifecycle > physics > gpu
100 - 1,000个点或实例化渲染三者同等重要
1,000 - 10,000个GPU优先gpu > physics > lifecycle
10,000 - 100,000个必须使用GPUgpu >> physics(着色器实现) > lifecycle
超过100,000个全GPU/计算管线仅用gpu,物理效果在着色器中实现

Skill Dependencies

技能依赖关系

particles-gpu (rendering foundation)
├── particles-physics (motion layer)
└── particles-lifecycle (management layer)
  • particles-gpu
    is always needed for rendering
  • particles-physics
    and
    particles-lifecycle
    are independent but complementary
  • 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
    particles-gpu
    optimization
  • 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 skills
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 skills

Effect Recipes

效果配方

Quick Start Templates

快速启动模板

EffectStart With
Ambient dustgpu (points) + lifecycle (continuous)
Button sparklegpu (points) + lifecycle (burst, fade)
Character trailgpu + lifecycle (trail)
WeatherAll three
Magic spellAll three
Data visualizationgpu + lifecycle
效果初始技能组合
环境尘埃gpu (points) + lifecycle (continuous)
按钮闪烁gpu (points) + lifecycle (burst, fade)
角色轨迹gpu + lifecycle (trail)
天气效果三种技能全用
魔法特效三种技能全用
数据可视化gpu + lifecycle

Integration with Other Domains

与其他领域的集成

Combined WithUse Case
shader-noise
Turbulent motion, organic shapes
shader-effects
Glow, chromatic aberration on particles
r3f-performance
Optimization, culling, LOD
gsap-fundamentals
Scripted particle animations
audio-reactive
Music-driven particle effects
结合技能使用场景
shader-noise
湍流运动、有机形态
shader-effects
粒子发光、色差效果
r3f-performance
性能优化、剔除、LOD
gsap-fundamentals
脚本化粒子动画
audio-reactive
音乐驱动的粒子效果

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