Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ollej/quad-gif
Display GIF animations with Macroquad
https://github.com/ollej/quad-gif
animation crate gif macroquad rust
Last synced: 3 months ago
JSON representation
Display GIF animations with Macroquad
- Host: GitHub
- URL: https://github.com/ollej/quad-gif
- Owner: ollej
- License: mit
- Created: 2022-06-21T19:47:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-23T12:15:48.000Z (about 1 year ago)
- Last Synced: 2024-07-08T07:43:21.606Z (4 months ago)
- Topics: animation, crate, gif, macroquad, rust
- Language: Rust
- Homepage:
- Size: 482 KB
- Stars: 15
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-quads - quad-gif - library for displaying looping GIF animations. (Libraries / Libraries: Other)
README
# quad-gif
[![Cross-compile](https://github.com/ollej/quad-gif/actions/workflows/crosscompile.yml/badge.svg)](https://github.com/ollej/quad-gif/actions/workflows/crosscompile.yml) [![Crates.io](https://img.shields.io/crates/v/quad-gif)](https://crates.io/crates/quad-gif) [![docs.rs](https://img.shields.io/docsrs/quad-gif)](https://docs.rs/quad-gif/latest/quad_gif/) [![Crates.io](https://img.shields.io/crates/l/quad-gif)](https://opensource.org/licenses/MIT)
Display looping GIF animations with Macroquad.
The animation will loop forever, regardless of how many iterations are set in
the file.[Documentation](https://docs.rs/quad-gif/latest/quad_gif/) on docs.rs
## Usage
There is a binary file included that can be used to show a GIF file.
```
quad-gif 0.2.0
Display a GIF file.Usage: quad-gif
```## API usage
The library can be used in a Macroquad application to show an animation.
```rust
use macroquad::prelude::*;
use quad_gif;#[macroquad::main("quad-gif")]
async fn main() {
let mut animation = quad_gif::GifAnimation::load("animation.gif".to_string()).await;clear_background(WHITE);
loop {
animation.draw();
animation.tick();
next_frame().await
}
}
```## License
Copyright 2022 Olle Wreede, released under the MIT License.
## Attribution
Animated Ferris in Action by A. L. Palmer
Happy as a Rustacean at Rust Fest Berlin 2016 (www.rustfest.eu)