/** * Функции easing: t=0..1 -> 0..1. Используются в Tween и переходах сцен. */ export type EaseFn = (t: number) => number; export const linear: EaseFn = (t) => t; export const quadIn: EaseFn = (t) => t * t; export const quadOut: EaseFn = (t) => 1 - (1 - t) * (1 - t); export const cubicIn: EaseFn = (t) => t * t * t; export const cubicOut: EaseFn = (t) => 1 - Math.pow(1 - t, 3); export const sineInOut: EaseFn = (t) => -(Math.cos(Math.PI * t) - 1) / 2;