Particle Systems in bevy
MIT License
CPU based Particle systems plugin for bevy inspired by Unity3D
shuriken particle system.
This is a work in progress with many missing features, it is not suitable for production. As this lib is in very early stage, expect the API to change often
Add ParticlesPlugin
to your bevy App
use bevy::prelude::*;
use bevy_particles::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(ParticlesPlugin)
.run();
}
You can then use ParticleSystemBundle
to spawn particle systems.
Note: The particle modifiers are not included in the bundle,
insert
the modifiers you want to the particle system entity. (See the example)
bevy_tickles provides two kinds of components:
ParticleSystemBundle
name | description |
---|---|
MaxParticleCount |
Limits the amount of particles (PERF) |
MaxParticleSize |
Limits the size of particles |
MaxParticleSpeed |
Limits the speed of particles |
ParticleGravity |
Adds a custom gravity force to particles |
SpeedOverTime |
Changes particle speed over time |
VelocityOverTime |
Changes particle velocity over time |
AngularVelocityOverTime |
Changes particle angular velocity (z rotation) over time |
OrbitalVelocityOverLifeTime |
Changes the particle velocity around the center over its lifetime |
LinearVelocityOverLifeTime |
Changes the particle velocity linearly over its lifetime |
SizeOverTime |
Changes particle size over time |
SizeOverSpeed |
Changes particle size over its speed |
RotationOverVelocity |
Rotates particles according to its velocity and direction |
RotationOverTime |
Rotates particles over time |
ColorOverLifeTime |
Sets color of a particle over time using a color gradient |
ColorOverSpeed |
Sets color of a particle over its using a color gradient |
PerlinNoise |
Uses a perlin noise to change particle velocity/Size/Rotation |
Transform
is often a bad idea, prefer using the ParticleEmitter::transform
field.ColorOverLifetime
/ColorOverSpeed
or SizeOverTime
/SizeOverSpeed
can lead to unexpected behaviorsinspector
This feature enables bevy_inspector_egui integration, allowing dynamic customization of your particle systems
Run with cargo run --example basic_example --features inspector
Run with cargo run --example animated_example --features inspector
Run with cargo run --example explosion_example --features inspector
Run with cargo run --example mesh_example --features inspector
Contributions welcome !