ParticleSystem
ParticleSystem ⟵ Object3D
Spawns particles in a box, moves them linearly, draws as Points (GX_POINTS). Derives from Object3D so you can scene->add(ps). Add to scene, call addParticles() and update(dt) each frame.
Methods
ParticleSystem()
Construct particle system with getDefaultSettings()
ParticleSystem(const ParticleSettings& settings)
Construct particle system (placeable; add to scene with scene->add(ps))
| settings | DTO with bounds, life, velocity, size, color, maxCount, rate |
void addParticles(u32 count)
Spawn count new particles within bounds
| count | Number of particles to spawn |
void update(f32 dt)
Advance simulation by dt: optional spawn, age, move, upload to Points
| dt | Delta time in seconds |
Points* getPoints() const
Get the Points object used for rendering (GX_POINTS)
static ParticleSettings getDefaultSettings()
Returns DTO with default values (compatible with Points / GX_POINTS)
Properties
| settings | ParticleSettings |