Skip to Content

Lerp

live Provides linear interpolation functions for all Fram3 styling types. Each method smoothly blends between a start and end value at a normalized position t in [0, 1]. Values of t outside [0, 1] are valid and produce extrapolation.

Methods

Alignment

Linearly interpolates each axis of two Single) values.

ParameterDescription
aStart alignment.
bEnd alignment.
tNormalized position in [0, 1].

Returns: The interpolated alignment.

Border

Linearly interpolates between two Single) values.

ParameterDescription
aStart border.
bEnd border.
tNormalized position in [0, 1].

Returns: The interpolated border.

BorderRadius

Linearly interpolates each corner radius of two Single) values.

ParameterDescription
aStart radius.
bEnd radius.
tNormalized position in [0, 1].

Returns: The interpolated border radius.

BoxDecoration

Linearly interpolates between two Single) values, blending each component independently.

ParameterDescription
aStart decoration.
bEnd decoration.
tNormalized position in [0, 1].

Returns: The interpolated box decoration.

Color

Linearly interpolates each RGBA channel between two FrameColor values.

ParameterDescription
aStart color.
bEnd color.
tNormalized position in [0, 1].

Returns: The interpolated color.

EdgeInsets

Linearly interpolates each edge of two Single) values.

ParameterDescription
aStart insets.
bEnd insets.
tNormalized position in [0, 1].

Returns: The interpolated insets.

Float

Linearly interpolates between two Single values.

ParameterDescription
aStart value.
bEnd value.
tNormalized position in [0, 1].

Returns: The interpolated value.

NullableBorder

Linearly interpolates between two nullable Single) values. Returns null when both are null. Snaps to the non-null side if one is null.

ParameterDescription
aStart border.
bEnd border.
tNormalized position in [0, 1].

Returns: The interpolated border, or null when both inputs are null.

NullableBorderRadius

Linearly interpolates between two nullable Single) values. Returns null when both are null. Snaps to the non-null side if one is null.

ParameterDescription
aStart radius.
bEnd radius.
tNormalized position in [0, 1].

Returns: The interpolated border radius, or null when both inputs are null.

NullableColor

Linearly interpolates between two nullable FrameColor values. Returns null when both are null. Snaps to the non-null side if one is null.

ParameterDescription
aStart color.
bEnd color.
tNormalized position in [0, 1].

Returns: The interpolated color, or null when both inputs are null.

NullableFloat

Linearly interpolates between two nullable Single values. Returns null when both are null. Snaps to the non-null side if one is null.

ParameterDescription
aStart value.
bEnd value.
tNormalized position in [0, 1].

Returns: The interpolated value, or null when both inputs are null.

NullableShadow

Linearly interpolates between two nullable Single) values. Returns null when both are null. Snaps to the non-null side if one is null.

ParameterDescription
aStart shadow.
bEnd shadow.
tNormalized position in [0, 1].

Returns: The interpolated shadow, or null when both inputs are null.

Shadow

Linearly interpolates between two Single) values.

ParameterDescription
aStart shadow.
bEnd shadow.
tNormalized position in [0, 1].

Returns: The interpolated shadow.

TextStyle

Linearly interpolates numeric properties of two Single) values. Boolean properties (Bold, Italic, Underline) are taken from when is greater than or equal to 0.5, otherwise from .

ParameterDescription
aStart text style.
bEnd text style.
tNormalized position in [0, 1].

Returns: The interpolated text style.

Last updated on