Skip to content

Tirtstan/LitMotion-Flexalon

Repository files navigation

LitMotion-Flexalon

A Unity extension that integrates LitMotion with Flexalon, enabling high-performance animations for Flexalon UI layout properties.

Features

  • Extension Methods - API for animating FlexalonObject properties.
  • Animation Components - Drop-in components for declarative animations.
  • Property Support - Animate Offset, Rotation, and Scale.
  • Motion Variants - Standard, Punch, and Shake animations for each property.
  • Axis Control - Exclude specific axes from animations when needed.

Installation

Note

LitMotion Animation is not required to use LitMotion-Flexalon.

Add this package to your Unity project via the Package Manager or copy the files directly into your Assets folder.

Install via git...

https://github.com/Tirtstan/LitMotion-Flexalon.git

Dependencies:

Usage

Extension Methods

Animate Flexalon properties using LitMotion's builder pattern:

using LitMotion;
using LitMotion.Extensions;
using LitMotion.Extensions.Flexalon;
using Flexalon;

// Animate offset
LMotion.Create(Vector3.zero, new Vector3(100f, 0f, 0f), 1f)
    .BindToFlexalonOffset(flexalonObject);

// Animate rotation (Euler angles)
LMotion.Create(Vector3.zero, new Vector3(0f, 180f, 0f), 1f)
    .WithEase(Ease.OutBack)
    .BindToFlexalonEulerAngles(flexalonObject);

// Animate scale
LMotion.Create(Vector3.one, Vector3.one * 1.5f, 0.5f)
    .WithEase(Ease.OutElastic)
    .BindToFlexalonScale(flexalonObject);

// Animate single axis
LMotion.Create(0f, 100f, 1f)
    .BindToFlexalonOffsetX(flexalonObject);

// Exclude axes from animation
LMotion.Create(Vector3.zero, Vector3.one * 50f, 1f)
    .BindToFlexalonOffset(flexalonObject, Axis.Y | Axis.Z); // Only X animates

LitMotion Animation Components

Add animation components directly in the Unity Inspector via the LitMotion Animation system:

  • Flexalon/Offset - Animate FlexalonObject.Offset
  • Flexalon/Offset (Punch) - Punch animation for Offset
  • Flexalon/Offset (Shake) - Shake animation for Offset
  • Flexalon/Rotation - Animate FlexalonObject.Rotation (euler angles)
  • Flexalon/Rotation (Punch) - Punch animation for Rotation (euler angles)
  • Flexalon/Rotation (Shake) - Shake animation for Rotation (euler angles)
  • Flexalon/Scale - Animate FlexalonObject.Scale
  • Flexalon/Scale (Punch) - Punch animation for Scale
  • Flexalon/Scale (Shake) - Shake animation for Scale

API Reference

For a complete list of available extension methods, see API Documentation.

About

Provides LitMotion integration for Flexalon layouts, enabling smooth and performant animations & transitions within Flexalon's layout system.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages