Developer publishes 12 UI easing curves as pure math functions for JS and C#
A developer has documented twelve commonly used UI easing curves as stateless, closed-form arithmetic functions that take a normalized time value and return a normalized position. The goal is to ensure identical animation behaviour across platforms such as web front ends and Unity clients, where subtle implementation differences can cause animations to feel inconsistent. The set includes standard polynomial curves like smoothstep, smootherstep, and cubic variants, as well as overshoot and anticipate curves that intentionally exceed the 0–1 output range. The author warns that clamping the output of overshoot or anticipate curves defeats their purpose, and advises choosing a different curve if the rendering layer cannot handle out-of-range values. All twelve curves are also provided as pre-sampled JSON lookup tables, with the worst-case interpolation error measured at under 0.001 across 20,001 test points.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in