How vincentgarreau/particles.js works
particles.js is a browser-side canvas particle-animation library. A page configures or loads particle options, initializes a canvas instance, and the runtime creates, updates, and draws particles; mouse and resize events enable interactive effects. The README also documents an external configuration generator. The runtime is implemented in one source file, so nodes represent responsibilities within that file rather than separate modules; unsampled implementation details and demo wiring are not asserted.
Main entry points: particles.js Particle updates
Components 15
Setup and configuration
- Particle options
- Public API
particles.js - Config loader
particles.js - Canvas setup
particles.js
Particle runtime
- Canvas element
- Particle creation
particles.js - Particle updates
particles.js - Particle drawing
particles.js - Particle links
particles.js - Particle motion
particles.js
Interaction
- Mouse events
particles.js - Interaction modes
particles.js - Resize handling
particles.js
Other components
- Web page
- Config generator
Connections 14
- Web page → Public API: loads library
README.md - Web page → Particle options: configures
README.md - Web page → Config loader: requests config
README.md - Config loader → Particle options: loads options
README.md - Public API → Canvas setup: initializes canvas
particles.js - Canvas setup → Canvas element: creates canvas
particles.js - Canvas setup → Particle creation: starts runtime
particles.js - Particle creation → Particle drawing: creates particles
particles.js - Particle updates → Particle drawing: draws particles
particles.js - Particle updates → Particle links: links particles
particles.js - Particle updates → Particle motion: applies motion
particles.js - Mouse events → Interaction modes: dispatches effects
particles.js - Resize handling → Canvas element: resizes canvas
particles.js - Config generator → Particle options: exports configuration
README.md