Module dagon.graphics.particles
A particle system.
Description
The dagon module defines the ParticleSystem class
for simulating and rendering particles, as well as supporting
components such as Emitter (for spawning particles) and various
ForceField types (for affecting particle motion and color). The system
supports attractors, deflectors, vortices, black holes, and
color changers, as well as per-particle properties like position,
velocity, acceleration, color, scale, rotation, and lifetime.
Particle systems are useful for effects such as fire, smoke, sparks,
magic, and environmental phenomena.
Functions
| Name | Description |
|---|---|
entityIsParticleSystem(entity)
|
Utility function to check if an entity is a particle system. |
Classes
| Name | Description |
|---|---|
Attractor
|
Attractor force field that pulls particles toward its position. |
BlackHole
|
Black hole force field that absorbs particles within a threshold distance. |
ColorChanger
|
Force field that changes the color of particles within a radius. |
Deflector
|
Deflector force field that pushes particles away from its position. |
Emitter
|
Component that emits and manages a set of particles. Controls emission parameters, initial particle properties, and material. |
ForceField
|
Abstract base class for force fields that affect particles. Force fields can modify particle acceleration, velocity, or color. |
ParticleSystem
|
Particle system component for simulating and rendering particles. |
Vortex
|
Vortex force field that imparts tangential and normal forces to particles. |
Structs
| Name | Description |
|---|---|
Particle
|
Represents a single particle with properties for simulation and rendering. |