---
name: "threejs-particle-system-gpu"
description: "Render millions of interactive 3D particles at 60fps using BufferGeometry and InstancedMesh."
metadata:
  author: "Mr.doob"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "create particle cloud threejs"
  - "use instancedmesh threejs"
  - "animate points buffergeometry"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Three.js GPU Instanced Particle Systems

Builds high-performance particle fields, galaxy simulations, and point clouds using Three.js PointsMaterial, custom Float32Array buffer attributes, and GPU instancing.

## When to Invoke
Invoke this skill whenever you need to:
- create particle cloud threejs
- use instancedmesh threejs
- animate points buffergeometry

## Execution SOP & Rules
1. Store positions in a flat Float32Array and attach to BufferGeometry with setAttribute('position').
2. Use InstancedMesh when particles require distinct 3D geometry rather than flat billboard points.
3. Enable pointsMaterial.depthWrite = false and blending = THREE.AdditiveBlending for luminous effects.
4. Compute transformations on the GPU or via Web Workers to keep the JavaScript main thread idle.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
