Repository navigation
Easing
shmellyorc edited this page Sep 13, 2026
·
3 revisions
Easing functions control the rate of change of a value over time, producing different acceleration and deceleration patterns for animations, transitions, and other time-based effects.
The easing library provides 41 EaseType values: Linear plus 10 curve families with In, Out, InOut, and OutIn variants.
| Family | Description |
|---|---|
| Linear | No easing, constant speed |
| Quadratic | Smooth acceleration and deceleration |
| Cubic | More pronounced acceleration and deceleration |
| Quartic | Strong acceleration and deceleration |
| Quintic | Very strong acceleration and deceleration |
| Sine | Smooth sinusoidal curves |
| Exponential | Extremely fast acceleration or deceleration |
| Circular | Circular arc motion |
| Back | Overshoots the target before settling |
| Elastic | Oscillates like a spring |
| Bounce | Bounces at the end or start |
| Variant | Description |
|---|---|
| In | Starts slow, ends fast |
| Out | Starts fast, ends slow |
| InOut | Starts slow, accelerates, then decelerates at the end |
| OutIn | Starts fast, decelerates, then accelerates again |
Input values outside 0..1 are clamped before the selected curve is evaluated. Back and Elastic curves may intentionally return values outside that normalized output range.
// Evaluate an easing function at a normalized time (0 to 1)
float t = 0.5f;
float eased = Easing.Ease(EaseType.QuadOut, t);
// Use the eased value for interpolation
float value = MathHelper.Lerp(0f, 100f, eased);| Type | Description |
|---|---|
Linear |
No easing, constant speed |
| Type | Description |
|---|---|
QuadIn |
Starts slow, accelerates toward the end |
QuadOut |
Starts fast, decelerates toward the end |
QuadInOut |
Starts slow, accelerates, then decelerates |
QuadOutIn |
Starts fast, decelerates, then accelerates |
| Type | Description |
|---|---|
CubicIn |
Starts very slow, accelerates toward the end |
CubicOut |
Starts fast, decelerates toward the end |
CubicInOut |
Starts slow, accelerates, then decelerates |
CubicOutIn |
Starts fast, decelerates, then accelerates |
| Type | Description |
|---|---|
QuartIn |
Starts very slow, accelerates strongly |
QuartOut |
Starts very fast, decelerates strongly |
QuartInOut |
Starts slow, accelerates strongly, then decelerates |
QuartOutIn |
Starts fast, decelerates strongly, then accelerates |
| Type | Description |
|---|---|
QuintIn |
Starts extremely slow, accelerates sharply |
QuintOut |
Starts extremely fast, decelerates sharply |
QuintInOut |
Starts slow, accelerates sharply, then decelerates |
QuintOutIn |
Starts fast, decelerates sharply, then accelerates |
| Type | Description |
|---|---|
SineIn |
Starts slowly with a smooth sinusoidal curve |
SineOut |
Ends slowly with a smooth sinusoidal curve |
SineInOut |
Starts and ends slowly with a smooth curve |
SineOutIn |
Slow middle section with sinusoidal smoothing |
| Type | Description |
|---|---|
ExpoIn |
Starts imperceptibly slow, accelerates extremely fast |
ExpoOut |
Starts extremely fast, decelerates imperceptibly |
ExpoInOut |
Starts imperceptibly slow, accelerates, then decelerates |
ExpoOutIn |
Starts fast, decelerates, then accelerates imperceptibly |
| Type | Description |
|---|---|
CircIn |
Follows a circular arc starting slowly |
CircOut |
Follows a circular arc ending slowly |
CircInOut |
Follows a circular arc starting and ending slowly |
CircOutIn |
Follows a circular arc with a slow middle |
| Type | Description |
|---|---|
BackIn |
Overshoots the starting point before moving forward |
BackOut |
Overshoots the ending point before settling |
BackInOut |
Overshoots both the start and end points |
BackOutIn |
Overshoots in the middle of the transition |
| Type | Description |
|---|---|
ElasticIn |
Oscillates with a spring-like effect at the start |
ElasticOut |
Oscillates with a spring-like effect at the end |
ElasticInOut |
Oscillates with a spring-like effect at both ends |
ElasticOutIn |
Oscillates with a spring-like effect in the middle |
| Type | Description |
|---|---|
BounceIn |
Bounces at the start of the transition |
BounceOut |
Bounces at the end of the transition |
BounceInOut |
Bounces at both the start and end |
BounceOutIn |
Bounces in the middle of the transition |
// Animate a value using easing
float duration = 1f;
float elapsed = 0f;
float startValue = 0f;
float endValue = 100f;
while (elapsed < duration)
{
float t = elapsed / duration;
float eased = Easing.Ease(EaseType.QuadOut, t);
float currentValue = MathHelper.Lerp(startValue, endValue, eased);
elapsed += frameTime.DeltaTime;
}| Feature | Description |
|---|---|
| 41 easing types | Linear plus 10 families × 4 directions |
| Normalized input | Values between 0 and 1 |
| Output behavior | Most curves remain near 0..1; Back and Elastic intentionally overshoot |
| All families | Quadratic, Cubic, Quartic, Quintic, Sine, Exponential, Circular, Back, Elastic, Bounce |
Home · Getting Started · Rendering · Custom Renderers · GitHub · Report an Issue
Built with VOID Engine · MIT License
- Coroutines
- State Machine
- Save System
- Pathfinding
- Logging
- Beacon Manager
- Beacon Event System
- Discoverable System
- Instance Helper
- BeaconManager Extensions
- BeaconHandle Extensions
- Enum Extensions
- String Extensions
- Int Extensions
- Float Extensions
- IEnumerable Extensions
- Random Extensions
- Sound Extensions
- Font Extensions