|
Aegis2D
Modular C++26 2D game engine for networked games
|
How an emitter spawns its particles, and how they change over their life. More...
#include <aegis2d/render/particles.hpp>
Public Attributes | |
| float | rate = 50.0F |
| Particles spawned per second while emitting; 0 for bursts only. | |
| Range | lifetime {.min = 1.0F, .max = 1.0F} |
| Life of each particle, in seconds. | |
| Range | speed {.min = 50.0F, .max = 100.0F} |
| Speed of each particle at its birth, in logical pixels per second. | |
| float | direction = 0.0F |
| Middle of the directions particles leave in, in radians: 0 to the right, pi / 2 down (y grows downwards on screen). | |
| float | spread = 2.0F * std::numbers::pi_v<float> |
| Width of the cone of directions around direction, in radians: 0 for a straight jet, 2 pi for every direction. | |
| float | start_size = 4.0F |
| Side of a particle at its birth, in logical pixels. | |
| float | end_size = 0.0F |
| Side of a particle at the end of its life. | |
| Color | start_color = rgb(0xFFD166) |
| Color at its birth. | |
| Color | end_color = rgb(0xEF476F, 0.0F) |
| Color at the end of its life, such as transparent to fade out. | |
| std::size_t | max_particles = 1000 |
| Most particles alive at once; spawns past it are dropped. | |
How an emitter spawns its particles, and how they change over their life.
| float aegis2d::render::EmitterConfig::direction = 0.0F |
Middle of the directions particles leave in, in radians: 0 to the right, pi / 2 down (y grows downwards on screen).
Color at the end of its life, such as transparent to fade out.
| float aegis2d::render::EmitterConfig::end_size = 0.0F |
Side of a particle at the end of its life.
| Range aegis2d::render::EmitterConfig::lifetime {.min = 1.0F, .max = 1.0F} |
Life of each particle, in seconds.
| std::size_t aegis2d::render::EmitterConfig::max_particles = 1000 |
Most particles alive at once; spawns past it are dropped.
| float aegis2d::render::EmitterConfig::rate = 50.0F |
Particles spawned per second while emitting; 0 for bursts only.
| Range aegis2d::render::EmitterConfig::speed {.min = 50.0F, .max = 100.0F} |
Speed of each particle at its birth, in logical pixels per second.
| float aegis2d::render::EmitterConfig::spread = 2.0F * std::numbers::pi_v<float> |
Width of the cone of directions around direction, in radians: 0 for a straight jet, 2 pi for every direction.
| float aegis2d::render::EmitterConfig::start_size = 4.0F |
Side of a particle at its birth, in logical pixels.