TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Paper/llms.txt
Use this file to discover all available pages before exploring further.
Easing static class provides a complete library of timing functions for use with Prowl.Paper’s animation system. Every function accepts a normalized time value t in the range [0, 1] and returns a transformed output value — also nominally [0, 1], though some functions (Back, Elastic, Spring) intentionally exceed this range to create overshoot and oscillation effects. Pass any of these functions as the easing argument to .Transition() or AnimateBool(), or compose your own using any Func<float, float>.
Using easing functions
element
.BackgroundColor(isHovered ? hoverColor : normalColor)
.Transition(GuiProp.BackgroundColor, 0.2f, Easing.SineInOut);
float t = paper.AnimateBool(isOpen, 0.3f, Easing.CubicOut);
// t smoothly moves from 0→1 when isOpen becomes true, 1→0 when false
element.ScaleY(UnitValue.Percentage(t * 100f));
All easing functions are pure
static float methods. You can reference them as method groups: Easing.CubicOut is assignable to Func<float, float> directly without a lambda wrapper.Linear
Easing.Linear(float t)
No easing — output equals input. Useful as a neutral baseline or when constant-rate animation is intentional.
Quadratic (power of 2)
Gentle acceleration or deceleration. A good default for most UI micro-interactions.Easing.EaseIn(float t)
Accelerates from zero velocity. Starts slow, finishes fast.
Easing.EaseOut(float t)
Decelerates to zero velocity. Starts fast, finishes slow. Ideal for elements sliding into view.
Easing.EaseInOut(float t)
Accelerates to the midpoint then decelerates symmetrically. Good for panel expansions.
Cubic (power of 3)
More pronounced curves than quadratic. A popular choice for material-style animations.Easing.CubicIn(float t)
Easing.CubicOut(float t)
Strong deceleration. Excellent for elements entering the screen.
Easing.CubicInOut(float t)
Quartic (power of 4)
Dramatic curves with pronounced acceleration/deceleration phases.Easing.QuartIn(float t)
Easing.QuartOut(float t)
Easing.QuartInOut(float t)
Quintic (power of 5)
Extreme polynomial curves. Best for dramatic reveals where a sharp snap is desired.Easing.QuintIn(float t)
Easing.QuintOut(float t)
Easing.QuintInOut(float t)
Sinusoidal
Smooth, natural-feeling curves based on a cosine/sine wave. Slightly softer than quadratic easing.Easing.SineIn(float t)
Easing.SineOut(float t)
A gentle finish. Commonly used for hover color fades.
Easing.SineInOut(float t)
Gentle in and out. Recommended for color transitions and opacity fades.
Exponential
Very abrupt start or stop based on 2^t. Creates a sharp “snap” feel.Easing.ExpoIn(float t)
Returns 0 when t == 0.
Easing.ExpoOut(float t)
Returns 1 when t == 1.
Easing.ExpoInOut(float t)
Returns exact 0 at t=0 and exact 1 at t=1.
Circular
Curves derived from a quarter-circle arc. Produces a physically plausible motion feel.Easing.CircIn(float t)
Easing.CircOut(float t)
Easing.CircInOut(float t)
Back
Anticipation and follow-through — the element briefly moves in the opposite direction before or after its main motion. Values can exceed[0, 1].
Easing.BackIn(float t)
Slight backward dip before accelerating forward.
Easing.BackOut(float t)
Overshoots the destination before settling. Great for “pop in” effects.
Easing.BackInOut(float t)
Slight overshoot at both ends.
Elastic
Spring-like oscillation — the value overshoots and bounces several times before settling. Values exceed[0, 1].
Easing.ElasticIn(float t)
Begins slowly with a spring-like startup wobble.
Easing.ElasticOut(float t)
Overshoots then oscillates to the final value. Good for “bounce arrival” feedback.
Easing.ElasticInOut(float t)
Oscillating at both the start and end of the transition.
Bounce
Simulates a physical ball bouncing — decelerates then rebounds in discrete jumps. Always stays within[0, 1].
Easing.BounceOut(float t)
Four-bounce deceleration to the final value. The most commonly used bounce variant.
Easing.BounceIn(float t)
Bounces at the start before settling into forward motion.
Easing.BounceInOut(float t)
Bouncing at both ends.
Additional utility functions
Beyond the named curve families above,Easing also provides:
Easing.Step(float t)
Instantly switches from 0 to 1 at the midpoint (t = 0.5). Useful for binary state flips that need to be driven by the transition timer.
Easing.SmoothStep(float t)
Hermite interpolation (clamps t to [0,1] internally). Smoother than linear with minimal computation.
Easing.SmootherStep(float t)
Higher-degree Hermite polynomial with continuous first and second derivatives. Visually indistinguishable from SmoothStep for most UI animations but mathematically smoother.
Easing.Spring(float t, float dampingRatio = 0.5f, float angularFrequency = 20.0f)
Physics-based spring simulation. Values can exceed [0, 1] significantly during oscillation.
Normalized time in
[0, 1].Controls oscillation damping.
0.1 produces heavy oscillation; 1.0 is critically damped with no overshoot.Controls the speed of oscillation. Higher values oscillate faster.
Spring must be wrapped in a lambda when used with Transition or AnimateBool because it has additional parameters beyond float t. Any Func<float, float> is accepted by both APIs.Choosing the right easing
| Scenario | Recommended easing |
|---|---|
| Color / opacity fade | SineInOut, EaseInOut |
| Element entering screen | CubicOut, CircOut |
| Element leaving screen | CubicIn, ExpoIn |
| Playful pop-in | BackOut, ElasticOut |
| Countdown / progress | Linear |
| Snappy button press | ExpoOut |
| Realistic bounce | BounceOut |
| Physics-feel widget | Spring |