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§
- Animated
Sprite - Component for playing sprite animations
- Animation
Custom Event - Convenience event for custom payloads
- Animation
Def - A single animation definition
- Animation
Particle Event - Convenience event for particle/VFX payloads
- Animation
Sound Event - Convenience event for sound payloads
- Animation
Trigger - A one-shot animation trigger - fires once at a specific time
- Animation
Trigger Event - Event fired when an AnimationTrigger fires (one-shot)
- Animation
Trigger Registry - Registry for custom animation trigger types.
- Animation
Triggered - Entity-scoped event fired when an animation trigger fires.
- Animation
Window - A duration-based animation window - has begin, tick, and end phases
- Animation
Window Changed - Entity-scoped event fired when an animation window changes phase.
- Animation
Window Event - Event fired for AnimationWindow phase changes (duration-based)
- Animation
Window Registry - Registry for custom animation window types.
- Sprite
Animation Plugin - Plugin for sprite animation support
- Sprite
Data - Sprite data with spritesheet reference and animations
- Window
Tracker - Tracks active animation windows for an entity
Enums§
- Loop
Mode - Animation loop mode
- Trigger
Payload - Payload data for animation triggers and windows
- Window
Phase - Phase of an animation window
Traits§
- Animation
Event Ext - Extension trait for registering animation trigger and window types.
- Animation
Trigger Type - Trait for types that can be animation triggers.
- Animation
Window Type - Trait for types that can be animation windows.