Skip to content

Latest commit

 

History

82 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_alight_motion

license

Current Status: 🚧 Experimental, Evolving

bevy_alight_motion — Bevy plugin for loading and playing Alight Motion project files.

English Simplified Chinese
English 简体中文

Introduction

Animation is more than just visuals; it is a form of logic. In many creative circles, complex behaviors and patterns are crafted entirely through motion design tools, yet they often lack a direct, loss-less path into modern game engines.

bevy_alight_motion is an experimental exploration dedicated to bringing these visually-expressed logics onto a "proper track" within the Bevy engine. It attempts to natively support Alight Motion project files, aiming to bridge the gap between the intuition of motion design and the performance of high-level game logic.

Currently, this is a pioneering attempt — a journey to see how we can transform professional motion graphics into living, interactive game systems without the friction of manual code recreation.

Features

  • 📂 Experimental Loading — Load .amproj ZIP archives and standalone .xml project files.
  • 🎬 Motion-to-Logic — Automatic keyframe animation with cubic-bezier and step easing support.
  • 🗺️ Coordinate Mapping — Coordinate system conversion (Alight Motion top-left origin to Bevy center origin).
  • 📦 Scene Hierarchy — Support for nested scenes (pre-compositions).
  • ⏯️ ECS Control — Customizable playback control via standard components.
  • 🚀 Future Vision — Ongoing exploration into supporting more complex shape types and effects.

Bevy Version Support

bevy bevy_alight_motion
0.18 0.3.0
0.17 < 0.3.0

How to Use

  1. Add Dependency to your Cargo.toml:

    [dependencies]
    bevy_alight_motion = { git = "https://github.com/Bli-AIk/souprune", path = "crates/bevy_alight_motion" }
  2. Register the Plugin in your Bevy App:

    use bevy::prelude::*;
    use bevy_alight_motion::prelude::*;
    
    fn main() {
        App::new()
            .add_plugins(DefaultPlugins)
            .add_plugins(AlightMotionPlugin)
            .add_systems(Startup, setup)
            .run();
    }
  3. Load a Project:

    fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
        commands.spawn(Camera2d);
        // Load the AM project from your assets folder
        load_am_project(&mut commands, &asset_server, "am/project.amproj");
    }
  4. Run the Example Player:

    cargo run --example player

How to Build

Prerequisites

  • Rust 1.80 or later (uses 2024 edition)

Build Steps

  1. Clone the repository:

    git clone https://github.com/Bli-AIk/souprune.git
    cd souprune/crates/bevy_alight_motion
  2. Build the project:

    cargo build --release
  3. Run tests:

    cargo test

Dependencies

This project uses the following crates:

Crate Version Description
bevy 0.18 Game engine
quick-xml 0.37 High-performance XML pull-parser/serializer
serde 1.0 Serialization/deserialization framework
zip 2.2 ZIP archive reading/writing
thiserror 2.0 Error derive macros

Contributors

Non-Code Contributors

  • 71: Provided many Alight Motion example projects (including Undertale bullet patterns and visual PVs) during testing, provided a great help with this project!
  • 陈皮: Provided many Alight Motion example projects (mostly Undertale bullet patterns), providing great help for AM integration.

Contributing

Contributions are welcome! Whether you want to fix a bug, add a feature, or improve documentation:

  • Submit an Issue or Pull Request.
  • Share ideas and discuss design or architecture.

License

This project is licensed under either of

at your option.

About

A plugin for the Bevy game engine that allows you to import and animate assets directly from Alight Motion project files.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages