Skip to content
Simple 2D particle system in Rust
Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.gitignore
Cargo.toml
LICENSE
README.md

README.md

Particle Frenzy

A simple 2D particle system in Rust using gfx. Particles are created with some initial state and then handed over to the GPU.

  • Advantage: Particle movement is performed on the GPU, so buffers don't need to be modified for updating the state.
  • Disadvantage: Dynamic particle state needs to be parameterized by time.

Parts of the code, especially the shaders, are based on gfx's particle example.

Status

Consider this a proof of concept. Currently, only circular particles are possible.

Example

See examples/ggez.rs for an example of using this crate in combination with ggez:

cargo run -j4 --release --example ggez

In this example, 2000 particles are spawned whenever the mouse is moved.

screenshot

You can’t perform that action at this time.