Docs / UI

Glossary: SmoothAnimationFrame<T>

The members of SmoothAnimationFrame, in alphabetical order.

Color legend plain property method

Goes from From to To between StartAtMs and StartAtMs + DurationMs of the time line, and goes back the same way when the time line reverses. Before its start it sets nothing. A shaping function bends the progress: pass any BaseShapingFunction from the BorrowedTorch.ShapingFunctions package, such as new CubicEaseOut(), or create one with ShapingFunctionFactory.Create(ShapingFunctionId.CubicEaseInOut).

A class deriving from BaseAnimationFrame<T>. The styles page shows it in context.

Names are colored by what they are: a property, a method or an event; values and fields keep the plain color.

Properties

Blend 🠆

Func<T, T, float, T> · Init-only. The value between From and To at a share of the way (0 at From, 1 at To, past them under a shaping function that overshoots), for a type the frame doesn’t blend by itself. int, float, double, Color, Margin, Point, Vector2 and Rectangle are blended without one; any other type switches from From to To at the frame’s end. Given, it is used for every type. null by default. See blends of your own.

DurationMs 🠆

int · Read-only. The length of the frame in milliseconds.

From 🠆

T · Read-only. The value at the start of the frame.

ShapingFunction 🠆

BaseShapingFunction · Read-only. The function that maps the frame’s progress (0 to 1) to the share of the way from From to To. Linear when none is given.

StartAtMs 🠆

int · Read-only. Where the frame starts on the time line, in milliseconds.

To 🠆

T · Read-only. The value at the end of the frame.

Methods

SmoothAnimationFrame() 🠆

SmoothAnimationFrame(T from, T to, int durationMs, int startAtMs = 0, BaseShapingFunction shapingFunction = null) · Creates the frame.

Parameter Type Description
from T The value at the frame’s start.
to T The value at the frame’s end.
durationMs int The length of the frame, in milliseconds.
startAtMs int The point of the time line where the frame starts, in milliseconds. Default: 0.
shapingFunction BaseShapingFunction How the value moves from from to to, such as CubicEaseOut; null moves it evenly (Linear). Default: null.