#animation #micro


Easily manage complex Bevy 2D sprite animations

11 releases (6 breaking)

0.7.0 Nov 5, 2023
0.6.0 Jul 29, 2023
0.5.0-beta.2 Apr 14, 2023
0.5.0-beta.0 Mar 8, 2023
0.1.1 Oct 27, 2022

#313 in Game dev

Download history 7/week @ 2023-08-12 7/week @ 2023-08-26 9/week @ 2023-09-02 22/week @ 2023-09-09 6/week @ 2023-09-16 2/week @ 2023-09-23 4/week @ 2023-09-30 16/week @ 2023-10-21 14/week @ 2023-10-28 26/week @ 2023-11-04 1/week @ 2023-11-11 5/week @ 2023-11-18 31/week @ 2023-11-25

64 downloads per month


711 lines

Bevy Sprite Animations

Easily manage complex 2D sprite animations

Quick Start

  • Add the BanimatePluginGroup to your app
  • Load one or more animation sets (see below for defining animation sets in files)
  • Spawn an entity with a SpriteSheetBundle and attach a SpriteAnimationBundle component, providing a Handle to an animation set

Code examples have been moved to the examples folder - clone the source and see them in action!

Types of Animation

Simple Animations

TODO: Describe simple animations

  • A simple looping animation with a single set of frames and frame rate, no control needed or provided

Sprite Animations

TODO: Describe sprite animations

  • Sets the name of the animation to play, play the animation. Simple.
  • Interrupt the current animation temporarily with an AnimationOverride

Directional Animations

TODO: Describe directional animations

  • Includes a component for altering the name of a playing animation based on its value, representing direction

Child Animations

Adding a ChildAnimationBundle to an entity will cause its status to by synced to it's Parent entity

Animation Sets

An animation set maps a name to a series of frames and a frame rate. A given animation has one frame rate for the whole animation, but different animations can have different frame rates (i.e. a "walk" animation could play at 100ms per frame, and an "idle" animation could play at 250ms per frame, but you can not set the duration of an individual frame within either animation).

An AnimationSet might contains many animations, and a given AnimationSet is likely to be attached to many entities. As such, animations use the Asset system to avoid passing around relatively large duplicate objects. Loaders are included for JSON and TOML data types, but only JSON is enabled by default. The loaders are not required, and so can therefore be disabled if another method of creating AnimationSet assets is desired.

Defining animations with JSON

With the json_loader feature enabled, you can load an animation set from a file with a .anim.json suffix that looks like this:

  "idle": {
	"frames": [
	"frame_time": 250
  "shoot_right": {
	"frames": [
	"frame_time": 100

Defining animations with TOML

With the toml_loader feature enabled, you can load an animation set from a file with a .anim.toml suffix that looks like this:

frames = [1, 2, 3]
frame_time = 250

frames = [34, 34, 34, 35, 36]
frame_time = 100


banimate version bevy version tilemap version
0.7.0 0.12 n/a
0.6.0-rc.1 0.11 55c15bfa43c7a9e2adef6b70007e92d699377454
0.5.x 0.10 0.10
0.5.x 0.10 0.10
0.2.x, 0.3.x, 0.4.x 0.9 0.9
0.1.x 0.8 0.8


~1M SLoC