Create an easing function that's defined by two control points of a bezier curve. The curve will always go directly through points 0 and 3, which are fixed at (0, 0) and (1, 1), respectively. Points 1 and 2 define the curvature of the bezier curve.
The result of this method is best passed directly to
Transitions.create()
.
@param x1 The x coordinate of control point 1. @param y1 The y coordinate of control point 1. @param x2 The x coordinate of control point 2. @param y2 The y coordinate of control point 2. @return The transition function, which takes exactly one 'ratio:Number' parameter.
Generated using TypeDoc
Provides Cubic Bezier Curve easing, which generalizes easing functions via a four-point bezier curve. That way, you can easily create custom easing functions that will be picked up by Starling's Tween class later. To set up your bezier curves, best use a visual tool like cubic-bezier.com or Ceaser.
For example, you can add the transitions recommended by Google's Material Design standards (see here) like this:
The
create
method returns a function that can be registered directly at the "Transitions" class.Code based on gre/bezier-easing and its Starling adaptation by Rodrigo Lopez.
@see starling.animation.Transitions @see starling.animation.Juggler @see starling.animation.Tween