24 releases

0.5.0 Oct 4, 2025
0.4.2 Aug 14, 2025
0.4.1 May 8, 2025
0.3.4 Mar 28, 2025
0.1.14 Apr 30, 2024

#439 in Game dev

Download history 66/week @ 2025-08-15 13/week @ 2025-08-22 1/week @ 2025-09-05 3/week @ 2025-09-12 3/week @ 2025-09-19 17/week @ 2025-09-26 147/week @ 2025-10-03 22/week @ 2025-10-10 7/week @ 2025-10-17 1/week @ 2025-10-24

1,382 downloads per month

WTFPL OR 0BSD

61KB
223 lines

bevy_text_animation

Crates.io Docs.rs License

screenshot

Text animation library for Bevy, just like typewriter effect. You can use it with Text or Text2d.

see examples for usage.

Versions

bevy bevy_text_animation
0.17 0.5
0.16 0.4
0.15 0.3
0.14 0.2
0.13 0.1

Usage

simple.rs

use bevy::prelude::*;
use bevy_text_animation::{TextAnimationFinished, TextAnimatorPlugin, TextSimpleAnimator};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(TextAnimatorPlugin)
        .add_systems(Startup, setup)
        .add_systems(Update, key_handler)
        .add_systems(Update, event_handler)
        .run();
}

fn setup(
    mut commands: Commands,
) {
    commands.spawn(Camera2d::default());

    commands.spawn((
        Text2d::new(""),
        TextFont {
            font_size: 60.0,
            ..default()
        },
        TextColor(Color::WHITE),
    )).insert(TextSimpleAnimator::new("Hello, World!", 8.0));
}

fn key_handler(
    keyboard_input: Res<ButtonInput<KeyCode>>,
    mut query: Query<&mut TextSimpleAnimator>,
) {
    for mut animator in query.iter_mut() {
        if keyboard_input.just_pressed(KeyCode::Space) {
            animator.play();
        }
    }
}

fn event_handler(
    mut events: MessageReader<TextAnimationFinished>,
) {
    for event in events.read() {
        println!("Text Animation finished for entity (id: {:?})", event.entity);
    }
}

TODOs

  • multiple sections
  • alpha color animation (custom animation)
  • punctuation

License

Dual licensed under WTFPL and/or 0BSD.

Dependencies

~66–100MB
~1.5M SLoC