Paper’s animation primitives are immediate-mode helpers that store their state in the current element’s storage bucket. You call them every frame — they advance internally usingDocumentation 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.
DeltaTime and return the current animated value. Because state is tied to CurrentParent, it is automatically cleaned up when the element disappears and resets when the element reappears.
Each primitive accepts an optional id string or relies on [CallerLineNumber] to produce a unique storage slot. This means you can stack multiple independent animations on one element without collisions, but calls inside loops or wrapper methods should pass an explicit id.
Timing Properties
Seconds elapsed since the previous frame, supplied via
BeginFrame(deltaTime). All animation primitives read this to advance frame-rate-independently.Monotonically increasing total elapsed seconds since the
Paper instance was created. Used by Pulse and Shake for phase-based effects.AnimateBool
0..1 progress value toward 1 when target is true and toward 0 when it is false. The underlying progress is stored linearly, so reversing target mid-animation produces a natural reversal regardless of the easing shape.
Direction to animate toward.
true drives progress toward 1; false drives it toward 0.Seconds to traverse the full
0 → 1 (or 1 → 0) range. Pass 0 to snap instantly.An optional easing function applied to the raw progress on read. Use any method from the
Easing static class (e.g., Easing.SineInOut). null = linear.Explicit slot identifier. Required when calling from inside a loop or a helper method that hides the real call site.
Eased
0..1 progress value.AnimateFloat
target using frame-rate-independent exponential smoothing (1 - exp(-speed * dt)). Higher speed produces faster catch-up — 8 reaches ~99% within roughly 0.5 seconds.
The value to converge toward each frame.
Smoothing speed. Higher = faster response.
Explicit slot ID for loops or wrappers.
Current interpolated value.
AnimateSpring
target. Maintains both a position and a velocity, so rapid target changes produce natural overshoot and settling behaviour. Good for UI elements that should feel “alive” — panel slide-ins, bouncy toggles, thumb snapping.
Value to converge toward.
Oscillation frequency in Hz (angular frequency =
frequency × 2π). Higher values make the spring stiffer and the response faster.0 = undamped (rings forever). 1 = critically damped (no overshoot). Values between these produce decaying oscillation. Values above 1 are over-damped (slow, no overshoot).Explicit slot ID.
Current spring position. May transiently exceed
target due to overshoot.AnimateColor
target. Each call site gets its own slot on CurrentParent.
The color to converge toward.
Smoothing speed per channel.
Explicit slot ID.
Current interpolated color.
AnimateVec2
AnimateFloat. Useful for chasing positions, sizes, or any other 2D quantity with exponential smoothing.
Target 2D value.
Smoothing speed.
Explicit slot ID.
Current interpolated vector.
AnimateAngle
350° to 10° goes through 360° (20° arc), not the long way (340° arc).
Target angle in degrees.
Smoothing speed.
Explicit slot ID.
Current angle in degrees. May drift outside
[0, 360) over time; apply % 360f if you need a normalized output.OneShot
trigger transitions from false to true (rising edge), OneShot ramps from 0 to 1 over duration seconds and stays at 1. When trigger returns to false, the value resets to 0 immediately.
Use this for flash effects, one-time entry animations, or badge pop-ins that should only play once per interaction.
Rising edge fires the ramp; falling edge resets it.
Seconds to ramp from
0 to 1.Optional easing applied to the output.
Explicit slot ID.
0..1 progress value, eased if a function is provided.Pulse
Time. Returns a smooth 0..1 wave. Useful for breathing highlights, blinking cursors, and idle glow effects.
Duration of one full cycle in seconds. Values
≤ 0 return 0.Current pulse value in
[0, 1], rising from 0 to 1 and back smoothly each period.Pulse is stateless — it reads Time directly and produces the same value for every element that calls it with the same period in the same frame. To phase-shift for staggered effects, offset by index: Pulse(period) where you shift Time in your own calculation, or use a separate AnimateBool/AnimateFloat per element.StableFor
current has held its present value without changing. Resets to 0 the frame the value flips. Unlocks long-press detection, hover-delayed tooltips, idle detection, and staggered list entrances.
The boolean value to track stability for.
Explicit slot ID.
Seconds
current has been continuously stable at its current value.Shake
trigger goes from false to true, an internal amplitude kicks to 1 and then decays exponentially. Returns a Float2 offset you can apply to a translate or position style property. Apply the result every frame to drive the shake animation.
Rising edge fires the shake; value holds while still triggered.
Peak displacement in pixels at amplitude
1.Exponential decay rate in
1/s. Higher = shake fades faster. 6 gives roughly a 0.5-second tail.Oscillation speed in Hz-like units.
30 produces quick chatter; lower values produce slower wobble.Explicit slot ID.
A 2D offset in pixels. Returns
Float2.Zero when amplitude drops below 0.001.The Easing Class
All animation methods that accept aFunc<float,float>? easing parameter work with the static Easing class, which provides a comprehensive set of easing functions.
Basic
Easing.Linear — no easingEasing.Step — instant jump at midpointEasing.SmoothStep — smooth HermiteEasing.SmootherStep — higher-order HermitePower curves
EaseIn / EaseOut / EaseInOut (quadratic)CubicIn / CubicOut / CubicInOutQuartIn / QuartOut / QuartInOutQuintIn / QuintOut / QuintInOutNatural
SineIn / SineOut / SineInOutExpoIn / ExpoOut / ExpoInOutCircIn / CircOut / CircInOutExpressive
BackIn / BackOut / BackInOut (overshoot)ElasticIn / ElasticOut / ElasticInOutBounceIn / BounceOut / BounceInOutEasing.Spring(t, dampingRatio, angularFrequency)float Fn(float t) where t is normalized 0..1 input and the return value is the transformed output (may exceed 0..1 for elastic/back/spring variants).