Module dagon.graphics.particles

A particle system.

Description

The dagon.graphics.particles 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

NameDescription
entityIsParticleSystem(entity) Utility function to check if an entity is a particle system.

Classes

NameDescription
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

NameDescription
Particle Represents a single particle with properties for simulation and rendering.