Lottie::Easing
Inherits Reference < Object
Cubic-bezier easing y = f(x) on the unit square — a faithful port of rlottie's VInterpolator (Gecko SMIL KeySpline): 11-entry LUT, Newton-Raphson (4 iterations) when the initial slope is ≥ 0.02, binary subdivision (max 10 iterations, 1e-7) otherwise.
Constants
LUT_SIZE = 11
NEWTON_ITERATIONS = 4
NEWTON_MIN_SLOPE = 0.02
STEP = 1.0 / (LUT_SIZE - 1)
SUBDIVISION_MAX = 10
SUBDIVISION_PRECISION = 0.0000001
Constructors
new(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64)
Sourcenew(o : Vec2, i : Vec2)
c1 = out tangent, c2 = in tangent (VInterpolator(outTangent, inTangent) in rlottie's interpolator factory).
Instance methods
value(x : Float64) : Float64
Source