Benimator
A sprite animation library for rust game development
Install / Use
/learn @jcornaz/BenimatorREADME
Benimator
A sprite animation library for rust game development.
Initially designed for bevy, it is now engine agnostic.
Status
This project is discontinued.
Goals
This project aim to provide the building the blocks to facilitate 2d sprite animation with any game engine.
Non-goals
Benimator is not rendering anything. It only keeps track of sprite indices.
One is expected to use benimator with a game engine such as bevy.
How it looks like
At its core benimator is an Animation data structure
and a State to track the frame-index as time pass.
// Create an animation
let animation = Animation::from_indices(0..=3, FrameRate::from_fps(10.0));
// Create a new animation state
let mut state = State::new();
// In the game loop, for each update, tell the state how much time has elapsed
let delta_time = Duration::from_millis(250);
state.update(&animation, delta_time);
// Then get the current frame index.
// (so that we can tell our engine to render the sprite at that index)
assert_eq!(state.frame_index(), 2);
Have a look at the examples for complete examples using the bevy game engine.
Installation
benimator is published on crates.io
You can add the dependency to your cargo file with:
cargo add benimator
Cargo features
| Feature | Description |
|---------|--------------------------------------------------|
| serde | Implementations of Serialize and Deserialize |
Feature flags not mentioned here are NOT part of the public API and are subject to breaking changes!
MSRV
The minimum supported rust version is currently 1.70.
It can be updated to a newer stable version when required, and that will not be considered a breaking change (it can happen in for a minor or patch release).
License
Licensed under either of
- The Unlicense (UNLICENSE or https://opensource.org/licenses/Unlicense)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Related Skills
himalaya
352.2kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
taskflow
352.2kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
