An open API service indexing awesome lists of open source software.

https://github.com/zpg6/particlez

A toy particle system written in Rust with crossterm, maybe useful for TUI applications.
https://github.com/zpg6/particlez

Last synced: 10 months ago
JSON representation

A toy particle system written in Rust with crossterm, maybe useful for TUI applications.

Awesome Lists containing this project

README

          

# particlez

A toy particle system written in Rust with `crossterm`, maybe useful for TUI applications.

## Examples

#### Fall to Floor

Uses `ParticleBoundsHandling::Stop` and displays particle based on its velocity. Particles hit the floor and appear to flatten.

```
cargo run --example fall_to_floor
```

![fall_to_floor](https://github.com/user-attachments/assets/c4255373-25b5-459c-92b6-817741f6f2d0)

#### Rainfall

Uses `ParticleBoundsHandling::Wrap` and displays particle based on its velocity. Raindrops moving faster look "thinner" and raindrops moving slower are more rounded.

```
cargo run --example rainfall
```

![rainfall](https://github.com/user-attachments/assets/dc5e1a02-7620-47e2-b20f-b61487e7dc02)

#### Bugs Crawl

Uses `ParticleBoundsHandling::Wrap` and `ParticleMovement::RandomSomeDirection` to simulate bugs crawling.

```
cargo run --example bugs_crawl
```

![bugs_crawl](https://github.com/user-attachments/assets/6bcdb9cf-4472-4d6f-901c-054d8b54a94e)

#### Spaceflight

Uses `ParticleBoundsHandling::Wrap` and varying `ParticleMovement::ConstantVelocity` to simulate smoothly passing objects in space, some near and some far in the distance.

```
cargo run --example spaceflight
```

![spaceflight](https://github.com/user-attachments/assets/1635d5a7-4f5f-416b-89ed-cd31a47c3229)

## Changelog

| Date | Version | Description |
| ---------- | ------- | ------------------------------------ |
| 2024-07-08 | 0.0.1 | Supports minimal animation examples. |