/** * - `t = 0` → returns `a` - `t = 0.5` → returns midpoint - `t = 1` → returns `b` - Single multiplication, single addition - No branching (fast) - Works for ANY numeric type (positions, colors, angles, scales) * @param {*} a * @param {*} b * @param {*} t * @returns */ export function lerp(a: any, b: any, t: any): any; export function lerp2D(p0: any, p1: any, t: any): { x: any; y: any; }; export function inverseLerp(a: any, b: any, value: any): number; export function remap(inMin: any, inMax: any, outMin: any, outMax: any, value: any): any; /** * in quadratic interpolation (or "quadratic lerp" in programming contexts), the resulting line is a parabolic curve that is determined by the three points. It is not a direct, piecewise linear connection of the points. Quadratic interpolation fits a second-degree polynomial (a parabola) through the three given points (e.g., A, B, and C). When used as a Bézier curve, the three points define the start point, an end point, and a control point that shapes the curve. The curve is generated by a continuous process of linear interpolations (lerps) between intermediate points, resulting in a smooth arc. * @param {*} p0 * @param {*} p1 * @param {*} p2 * @param {*} t * @returns */ export function quadraticBezier(p0: any, p1: any, p2: any, t: any): { x: any; y: any; }; /** * the tangent vector of a quadratic Bézier curve is directly related to a linear interpolation (LERP). Specifically, the first derivative of a quadratic Bézier curve equation is a LERP function that defines the curve's velocity and direction (tangent) at any given parameter \(t\). A quadratic Bézier curve is defined as \(B(t)=(1-t)^{2}P_{0}+2(1-t)tP_{1}+t^{2}P_{2}\).The first derivative (rate of change with respect to \(t\)) is \(B^{\prime }(t)=2(1-t)(P_{1}-P_{0})+2t(P_{2}-P_{1})\).This derivative can be expressed as a LERP between the vectors \((P_{1}-P_{0})\) and \((P_{2}-P_{1})\), scaled by 2. * @param {*} p0 * @param {*} p1 * @param {*} p2 * @param {*} t * @returns */ export function quadraticBezierTangent(p0: any, p1: any, p2: any, t: any): { x: number; y: number; }; export function cubicBezier(p0: any, p1: any, p2: any, p3: any, t: any): { x: any; y: any; }; export function cubicBezierTangent(p0: any, p1: any, p2: any, p3: any, t: any): { x: number; y: number; magnitude: number; }; export function distance2D(p1: any, p2: any): number; /** * **The insight:** We don't change lerp. We change **t**. ```javascript // Linear (boring) const x = lerp(a, b, t); // Beautiful const easedT = easeOutCubic(t); const x = lerp(a, b, easedT); ``` Easing functions transform `t` from a straight line into a curve. Same lerp, different feel. */ export function easeInQuad(t: any): number; export function easeOutQuad(t: any): number; export function easeInOutQuad(t: any): number; export function easeInCubic(t: any): number; export function easeOutCubic(t: any): number; export function easeInOutCubic(t: any): number; /** * - **EaseIn**: Slow start, fast end (accelerate) - **EaseOut**: Fast start, slow end (decelerate) - **EaseInOut**: Slow both ends, fast middle (S-curve) */ export function easeInQuart(t: any): number; export function easeOutQuart(t: any): number; export function easeInOutQuart(t: any): number; export function easeOutElastic(t: any): number; export function easeInElastic(t: any): number; export function easeOutBounce(t: any): number; export function easeInBounce(t: any): number; export function easeOutBack(t: any): number; export class BezierChain { segments: any[]; addSegment(p0: any, p1: any, p2: any, p3: any): void; addSmoothSegment(p2: any, p3: any): void; getPoint(globalT: any): any; getTangent(globalT: any): { x: number; y: number; magnitude: number; }; removeFirstSegment(): void; }