custom-easing.ts - a set of easing functions that generate arrays of tweens/frames; when placed in an animation framework/library they emulate animations using said easing function. Since, the easing frames can be placed are generated on initial run and almost every conventional animation library/framework supports multiple animation frames, you get great performance together with even better support.
✓ Published0🌍 Public
JJastor11
Last edited Jan 20, 2022
Created on Dec 5, 2025
This example shows a suite of customizable easing functions that generate precomputed animation frames, which can be plugged into any animation library for smooth, performant transitions. It implements traditional easings like Quad, Elastic, Spring, and Bounce, alongside a Bézier curve-based easing function adapted from `bezier-easing`. The code precomputes animation frames based on easing parameters, caching optimal durations for spring effects. It also demonstrates cross-environment utilities for server-side rendering, including browser object abstraction and CSS value parsing with unit and color conversion.
AI-generated description