Crates.io | fireworks-erikh |
lib.rs | fireworks-erikh |
version | 0.1.1 |
source | src |
created_at | 2023-09-16 14:10:21.488426 |
updated_at | 2023-09-16 14:18:29.435117 |
description | Fireworks screensaver/demo in the terminal |
homepage | https://github.com/erikh/fireworks |
repository | https://github.com/erikh/fireworks |
max_upload_size | |
id | 974366 |
size | 25,786 |
This is the fireworks demo that I wrote to learn python from. I tried to see what it would also look like in rust, and I was pleasantly surprised at the results.
One thing this version does differently is that it moves the cursor position based on a difference of the previous draw and the current; this results in a much more optimized draw routine. You will notice the frames per second much higher and I feel the animation is a little better. It is also much easier on the CPU.
This is published as fireworks-erikh
on
crates.io and installs a fireworks
binary when you cargo install
it. This conflicts with the
fireworks
crate which does more or less
the same thing, just done by someone else, hah. Enjoy the weird terminal
screensavers I guess.
This is a TUI "screen saver" that displays fireworks on the terminal. It will
display them until Ctrl+C is pressed and is designed to work with tmux
, etc,
to provide some bling on your terminal when you only need half of it.
Some notes:
10 fireworks are launched at start, and every 5 iterations (about half a second) a new one is launched. Fireworks trail north and have a chance of exploding on every frame. Each flare and explosion have random components to the trail and characters used. If the terminal is resized, it clears and rebuilds the scene anew.
Erik Hollensbe git@hollensbe.org