Skip to content

textmode.js / Textmodifier / ease

Method: ease()

ts
ease(name, amount): number;

Apply an easing curve to a normalized amount.

Inputs are clamped to the 0-1 range for animation-friendly behavior. Outputs are not clamped, so back, elastic, and bounce curves can overshoot.

Parameters

ParameterTypeDescription
name| "linear" | "inQuad" | "outQuad" | "inOutQuad" | "inCubic" | "outCubic" | "inOutCubic" | "inQuart" | "outQuart" | "inOutQuart" | "inQuint" | "outQuint" | "inOutQuint" | "inSine" | "outSine" | "inOutSine" | "inExpo" | "outExpo" | "inOutExpo" | "inCirc" | "outCirc" | "inOutCirc" | "inBack" | "outBack" | "inOutBack" | "inElastic" | "outElastic" | "inOutElastic" | "inBounce" | "outBounce" | "inOutBounce"Easing curve name.
amountnumberNormalized amount to ease.

Returns

number

Eased amount.

Example