Skip to main content

Module particle

Module particle 

Source
Expand description

Mathematical particle system.

Particles are driven by MathFunctions, not simple velocity/gravity. This creates particles that move in mathematically meaningful ways. Includes emitters, forces, trails, sub-emitters, collision, GPU data export.

Modules§

emitters
Preset emitter implementations.
flock
Full boid/flocking simulation with obstacle avoidance, leader following, and predator flee.
gpu_particles
GPU particle system — compute shader driven, double-buffered, indirect draw.
particle_render
GPU particle rendering bridge — renders particles directly from compute SSBO using indirect draw, with zero CPU readback.

Structs§

BurstEvent
A one-shot burst event within a continuous emitter.
ColorGradient
A color gradient over normalized lifetime [0,1].
ContinuousEmitter
Emitter that fires continuously at a given rate.
FastRng
Xoshiro-style fast RNG for particle systems.
FloatCurve
A float keyframe curve for particle properties over normalized lifetime [0,1].
GpuParticleInstance
GPU-compatible instanced particle data: position + size + color (10 floats).
LodParticleSystem
A multi-LOD particle system that reduces fidelity based on camera distance.
MathParticle
An individual math-driven particle.
ParticleEffect
A named, reusable particle effect that combines template + shape + forces.
ParticleFlags
Bitfield of particle feature flags.
ParticleGroup
A named group of particles with shared behavior modifiers.
ParticleLibrary
Registry of named particle effects.
ParticlePool
Pre-allocated pool of particles.
ParticleSystem
A self-contained particle system with its own pool, forces, and emitters.
ParticleSystemStats
System-wide particle statistics.
ParticleTemplate
A reusable template for spawning particles from an emitter.
PoolStats
Runtime stats for the particle pool.
RangeParam
A min/max range parameter that returns a random value when sampled.
ScaleCurve
A scale-over-life curve: (time, scale_x, scale_y).
SubEmitterRef
Reference to a sub-emitter that spawns on particle death.
TrailRibbon
Computed trail ribbon geometry for a single particle.

Enums§

EmitterPreset
Preset emitter configurations for common game events.
EmitterShape
Defines the 3-D region from which a burst emits.
ParticleForce
A standalone particle force that can be added to a system.
ParticleInteraction
How a particle interacts with other nearby particles.

Functions§

emit
Spawn particles from a preset into a pool.
export_gpu_instances