A Unity extension that integrates LitMotion with Flexalon, enabling high-performance animations for Flexalon UI layout properties.
- Extension Methods - API for animating
FlexalonObjectproperties. - Animation Components - Drop-in components for declarative animations.
- Property Support - Animate
Offset,Rotation, andScale. - Motion Variants - Standard, Punch, and Shake animations for each property.
- Axis Control - Exclude specific axes from animations when needed.
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.
https://github.com/Tirtstan/LitMotion-Flexalon.gitDependencies:
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 animatesAdd 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
For a complete list of available extension methods, see API Documentation.