Documentation Index Fetch the complete documentation index at: https://mintlify.com/TextAliveJp/textalive-app-api/llms.txt
Use this file to discover all available pages before exploring further.
The Ease class provides a collection of static easing functions you can use to create smooth, non-linear animations synchronized with music playback. All functions accept an input in the range [0, 1] and return an output in the same range.
This implementation is inherited from the CreateJS open source library. See the live demo to visualize all available easing curves.
Combine any easing function with a rendering unit’s progress(position) method to drive smooth animations. progress maps the current playback position to a [0, 1] value within the unit’s time range, and you pass that value into an easing function to get a non-linear result.
Practical example
import { Ease } from "textalive-app-api" ;
// In onTimeUpdate:
const beat = player . findBeat ( position );
if ( beat ) {
const t = Ease . cubicOut ( beat . progress ( position ));
element . style . transform = `scale( ${ 1 + t * 0.3 } )` ;
}
// Custom power ease:
const strongEase = Ease . getPowInOut ( 4 );
const t = strongEase ( char . progress ( position ));
Linear
A linear (no-op) easing function. Output equals input.
Flash-style ease
Ease.get
(amount: number) => (input: number) => number
Returns an easing function that mimics the simple -100 to 100 easing in Adobe Flash/Animate. A value from -1 (ease in) to 1 (ease out) indicating the strength and direction of the ease.
Power eases
These factory functions return an easing function based on an exponential power.
Ease.getPowIn
(pow: number) => (input: number) => number
Returns a configurable exponential ease-in function. The exponent to use. For example, 3 returns a cubic ease.
Ease.getPowOut
(pow: number) => (input: number) => number
Returns a configurable exponential ease-out function.
Ease.getPowInOut
(pow: number) => (input: number) => number
Returns a configurable exponential ease-in-out function.
Quad eases (pow=2)
Ease.quadIn
(input: number) => number
Quadratic ease in.
Ease.quadOut
(input: number) => number
Quadratic ease out.
Ease.quadInOut
(input: number) => number
Quadratic ease in-out.
Cubic eases (pow=3)
Ease.cubicIn
(input: number) => number
Cubic ease in.
Ease.cubicOut
(input: number) => number
Cubic ease out.
Ease.cubicInOut
(input: number) => number
Cubic ease in-out.
Quart eases (pow=4)
Ease.quartIn
(input: number) => number
Quartic ease in.
Ease.quartOut
(input: number) => number
Quartic ease out.
Ease.quartInOut
(input: number) => number
Quartic ease in-out.
Quint eases (pow=5)
Ease.quintIn
(input: number) => number
Quintic ease in.
Ease.quintOut
(input: number) => number
Quintic ease out.
Ease.quintInOut
(input: number) => number
Quintic ease in-out.
Sine eases
Ease.sineIn
(input: number) => number
Sinusoidal ease in.
Ease.sineOut
(input: number) => number
Sinusoidal ease out.
Ease.sineInOut
(input: number) => number
Sinusoidal ease in-out.
Back eases
Back eases overshoot slightly before settling at the target value.
Ease.getBackIn
(amount: number) => (input: number) => number
Returns a configurable back ease-in function. The strength of the overshoot. The default back ease uses approximately 1.7.
Ease.getBackOut
(amount: number) => (input: number) => number
Returns a configurable back ease-out function. The strength of the overshoot.
Ease.getBackInOut
(amount: number) => (input: number) => number
Returns a configurable back ease-in-out function. The strength of the overshoot.
Ease.backIn
(input: number) => number
Back ease in with the default overshoot amount (~1.7).
Ease.backOut
(input: number) => number
Back ease out with the default overshoot amount.
Ease.backInOut
(input: number) => number
Back ease in-out with the default overshoot amount.
Circular eases
Ease.circIn
(input: number) => number
Circular ease in.
Ease.circOut
(input: number) => number
Circular ease out.
Ease.circInOut
(input: number) => number
Circular ease in-out.
Bounce eases
Ease.bounceIn
(input: number) => number
Bounce ease in.
Ease.bounceOut
(input: number) => number
Bounce ease out.
Ease.bounceInOut
(input: number) => number
Bounce ease in-out.
Elastic eases
Elastic eases produce a spring-like oscillation around the target value. You can configure their amplitude and period.
Ease.getElasticIn
(amplitude: number, period: number) => (input: number) => number
Returns a configurable elastic ease-in function. The amplitude of the oscillation.
The period of the oscillation.
Ease.getElasticOut
(amplitude: number, period: number) => (input: number) => number
Returns a configurable elastic ease-out function. The amplitude of the oscillation.
The period of the oscillation.
Ease.getElasticInOut
(amplitude: number, period: number) => (input: number) => number
Returns a configurable elastic ease-in-out function. The amplitude of the oscillation.
The period of the oscillation.
Ease.elasticIn
(input: number) => number
Elastic ease in with default amplitude and period.
Ease.elasticOut
(input: number) => number
Elastic ease out with default amplitude and period.
Ease.elasticInOut
(input: number) => number
Elastic ease in-out with default amplitude and period.