Skip to content

286799714/MaydayAnimationEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Mayday Animation Engine

Java License Version

A powerful Java runtime animation library for creating smooth, high-performance animations and pose blending systems.

✨ Features

  • 🎯 High Performance: Optimized for real-time animation with efficient memory management
  • πŸ”„ Advanced Blending: Support for blendspace, layered, kinematic interpolation blending
  • πŸŽͺ Keyframe Animation: Flexible keyframe system with multiple interpolation methods
  • πŸ—οΈ Modular Design: Clean architecture with extensible components
  • ⚑ Real-time Ready: Designed for game engines and real-time applications

πŸš€ Quick Start

Prerequisites

  • Java 8 or higher
  • Gradle (for building from source)

Installation

Maven Dependency

<dependency>
    <groupId>com.maydaymemory</groupId>
    <artifactId>mae</artifactId>
    <version>1.1.2</version>
</dependency>

Gradle Dependency

implementation 'com.maydaymemory:mae:1.1.2'

Manual Installation

git clone https://github.com/286799714/MaydayAnimationEngine.git
cd MaydayAnimationEngine
./gradlew publishToMavenLocal

πŸ“– Usage Examples

Basic Animation Setup

// Create a bone transform factory
BoneTransformFactory transformFactory = new ZYXBoneTransformFactory();

// Create a pose builder supplier
Supplier<PoseBuilder> poseBuilderSupplier = LinkedListPoseBuilder::new;

// Create an animation
Animation animation = new BasicAnimation("walk", factory, poseBuilderSupplier);

// Set up translation channel for bone 0
InterpolatableChannel<Vector3fc> translationChannel = new ArrayInterpolatableChannel<>();
translationChannel.addKeyframe(new Vector3fKeyframe(0.0f, new Vector3f(0, 0, 0)));
translationChannel.addKeyframe(new Vector3fKeyframe(1.0f, new Vector3f(1, 0, 0)));

animation.setTranslationChannel(0, translationChannel);

// Evaluate animation at time 0.5s
Pose pose = animation.evaluate(0.5f);

Pose Blending

// Create a blender
AdditiveBlender blender = new SimpleAdditiveBlender(transformFactory, poseBuilderSupplier);

// Blend two poses
Pose basePose = // ... your base pose
Pose additivePose = // ... your additive pose
Pose result = blender.blend(basePose, additivePose);

Blend Space Usage

// Create a 1D blend space
BlendSpace1D blendSpace = new SimpleBlendSpace1D(factory, poseBuilderSupplier);

// Add sample poses
blendSpace.addSampler(0.0f, idlePose);
blendSpace.addSampler(1.0f, walkPose);
blendSpace.addSampler(2.0f, runPose);

// Blend at speed 1.5
Pose blendedPose = blendSpace.blend(1.5f);

πŸ—οΈ Architecture

Core Components

  • Animation: Main interface for animation playback and evaluation
  • Pose: Represents a skeletal pose with bone transformations
  • Blender: Handles pose blending operations (additive, additional, kinematic, blendspace)
  • Controlling: Define animation graphs, nodes, parameter passing, and animation state machines

Package Structure

src/main/java/com/maydaymemory/mae/
β”œβ”€β”€ basic/          # Animation and pose definition
β”œβ”€β”€ blend/          # Blending algorithms and blend spaces
β”œβ”€β”€ control/        # Control flow and node system
└── util/           # Utility classes and math functions

πŸ“š Documentation

To be done...

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Code Style

  • Follow Java coding conventions
  • Add comprehensive Javadoc comments
  • Include unit tests for new features
  • Ensure all tests pass before submitting

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

πŸ“Š Project Status

GitHub stars GitHub forks GitHub issues GitHub pull requests


Made with ❀️ by MaydayMemory

If this project helps you, please give it a ⭐️

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages