# thom463s/2d-particle-emitter architecture

> Architecture diagram of the GitHub repository thom463s/2d-particle-emitter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thom463s/2d-particle-emitter
- Repository: https://github.com/thom463s/2d-particle-emitter

## Overview

This small Luau library creates and controls 2D particle emitters that mimic Roblox emitters. The documented workflow is to create or convert an emitter, configure its properties and parent, then bind it to a RunService loop or call Update manually; emission creates particles that are displayed under the configured parent. The README documents these API relationships, but no source excerpts were available, so implementation details beyond them are omitted.

Main entry points: [`src/ParticleEmitter.luau`](https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter.luau) (Particle Emitter), [`src/ParticleEmitter/Particle.luau`](https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter/Particle.luau) (Particle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Emitter Runtime"]
  node_emitter["Particle Emitter"]
  node_particle["Particle<br/>[Particle.luau]"]
  node_types["Emitter Types<br/>[Types.luau]"]
end

node_user(("Library User"))
node_roblox_emitter["Roblox Emitter"]
node_runservice["RunService"]
node_gui_parent["GUI Parent"]

node_user -->|"creates and configures"| node_emitter
node_roblox_emitter -->|"converts from"| node_emitter
node_user -->|"binds or updates"| node_emitter
node_emitter -->|"binds to loop"| node_runservice
node_emitter -->|"emits particles"| node_particle
node_emitter -->|"parents particle labels"| node_gui_parent

click node_emitter "https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter.luau"
click node_particle "https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter/Particle.luau"
click node_types "https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter/Types.luau"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_emitter,node_particle,node_types,node_user,node_gui_parent toneBlue
class node_roblox_emitter,node_runservice toneIndigo
```

## Components

### Emitter Runtime

- [Particle Emitter](https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter.luau): `src/ParticleEmitter.luau`
- [Particle](https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter/Particle.luau): `src/ParticleEmitter/Particle.luau`
- [Emitter Types](https://github.com/thom463s/2d-particle-emitter/blob/main/src/ParticleEmitter/Types.luau): `src/ParticleEmitter/Types.luau`

### Other components

- **Library User**
- **Roblox Emitter**
- **RunService**
- **GUI Parent**

## Connections

- Library User → Particle Emitter: creates and configures (evidence: `README.md`)
- Roblox Emitter → Particle Emitter: converts from (evidence: `README.md`)
- Library User → Particle Emitter: binds or updates (evidence: `README.md`)
- Particle Emitter → RunService: binds to loop (evidence: `README.md`)
- Particle Emitter → Particle: emits particles (evidence: `README.md`)
- Particle Emitter → GUI Parent: parents particle labels (evidence: `README.md`)
