Crates.io | animations_rs |
lib.rs | animations_rs |
version | 0.1.1 |
source | src |
created_at | 2024-03-23 17:20:50.99862 |
updated_at | 2024-03-23 21:02:13.238868 |
description | A library for console animations in Rust |
homepage | https://github.com/Arteiii/animations_rs |
repository | https://github.com/Arteiii/animations_rs |
max_upload_size | |
id | 1183692 |
size | 36,875 |
easy to use cli animation lib based on crossterm
Do you often find yourself gazing into the void of your terminal, wondering if your computer has decided to take a coffee break without notifying you?
After countless late nights (1) spent wrestling with terminal buffers and ASCII art, after enduring more trial and error than we care to admit, we proudly present to you our humble attempt to transform loading animations from a headache into a delight
It's as easy as pie (or maybe even easier, depending on your pie-making skills)! Just follow these simple steps:
use animations_rs::{spinner::PreDefined, LoadingAnimation};
fn scope_example() {
// create a LoadingAnimation instance using one of the predefined animations
let _loading_animation = LoadingAnimation::new(PreDefined::dot_spinner1(false)); // invert frames bool (false)
// `loading_animation` will run out of scope now and get dropped,
// thus the animation will stop and remove itself from the console
}
But wait, there's more! We're cooking up some extra features, like the ability to have multiple animations simultaneously and the power to delete specific ones.
Now, we won't promise you that cli_loading_magic will solve all your problems. We can't guarantee it won't crash your terminal or cause your computer to sprout legs and walk away in protest. But hey, life's an adventure, right? Embrace the chaos, enjoy the ride, and remember: if all else fails, there's always Ctrl+C.
Feel free to create an issue with suggestions or bug reports.
This project wouldn't have been possible without the amazing work of the following projects:
These projects not only provided delightful animations but also spared me from the arduous task of creating frames myself (who wants to do that anyway?)
This project is licensed under the DWFYW License.
For more information, see the LICENSE file.