Crate bevy_map_animation

Crate bevy_map_animation 

Source
Expand description

bevy_map_animation - Animation and sprite types for bevy_map_editor

This crate provides types for defining sprite sheets with multiple animations, designed for use with the bevy_map_editor ecosystem.

§Usage

use bevy_map_animation::{SpriteData, AnimationDef, LoopMode};

let mut sprite = SpriteData::new("sprites/character.png", 32, 32);
sprite.add_animation("idle", AnimationDef {
    frames: vec![0, 1, 2, 3],
    frame_duration_ms: 200,
    loop_mode: LoopMode::Loop,
});
sprite.add_animation("attack", AnimationDef {
    frames: vec![4, 5, 6, 7, 8],
    frame_duration_ms: 80,
    loop_mode: LoopMode::Once,
});

Structs§

AnimatedSprite
Component for playing sprite animations
AnimationCustomEvent
Convenience event for custom payloads
AnimationDef
A single animation definition
AnimationParticleEvent
Convenience event for particle/VFX payloads
AnimationSoundEvent
Convenience event for sound payloads
AnimationTrigger
A one-shot animation trigger - fires once at a specific time
AnimationTriggerEvent
Event fired when an AnimationTrigger fires (one-shot)
AnimationTriggerRegistry
Registry for custom animation trigger types.
AnimationTriggered
Entity-scoped event fired when an animation trigger fires.
AnimationWindow
A duration-based animation window - has begin, tick, and end phases
AnimationWindowChanged
Entity-scoped event fired when an animation window changes phase.
AnimationWindowEvent
Event fired for AnimationWindow phase changes (duration-based)
AnimationWindowRegistry
Registry for custom animation window types.
SpriteAnimationPlugin
Plugin for sprite animation support
SpriteData
Sprite data with spritesheet reference and animations
WindowTracker
Tracks active animation windows for an entity

Enums§

LoopMode
Animation loop mode
TriggerPayload
Payload data for animation triggers and windows
WindowPhase
Phase of an animation window

Traits§

AnimationEventExt
Extension trait for registering animation trigger and window types.
AnimationTriggerType
Trait for types that can be animation triggers.
AnimationWindowType
Trait for types that can be animation windows.