Class: H_bezier

H_bezier

Implements cubic Bezier easing functions for animation timing.
Used internally by H_anim for custom easing curves.
can be accessed from h.libs.bezier
Original script from https://github.com/gre/Bezier-easing

new H_bezier(mX1, mY1, mX2, mY2)

animate.js, line 140
Name Type Description
mX1 number X coordinate of first control point (0..1).
mY1 number Y coordinate of first control point.
mX2 number X coordinate of second control point (0..1).
mY2 number Y coordinate of second control point.

Methods

easing(x){number}

animate.js, line 198
Computes the easing value for a given progress x.
Name Type Description
x number The progress (0..1).
Returns:
Type Description
number The eased value.

getTForX(aX){number}

animate.js, line 173
Gets the parameter t for a given x value on the Bezier curve.
Name Type Description
aX number The x value (0..1).
Returns:
Type Description
number The parameter t.