TimelineEasepublic class Spline extends java.lang.Object implements TimelineEase
| Constructor | Description |
|---|---|
Spline(float easeAmount) |
|
Spline(float x1,
float y1,
float x2,
float y2) |
Creates a new instance of SplineInterpolator with the control points
defined by (x1, y1) and (x2, y2).
|
| Modifier and Type | Method | Description |
|---|---|---|
float |
map(float lengthFraction) |
Given a fraction of time along the spline (which we can interpret as the
length along a spline), return the interpolated value of the spline.
|
public Spline(float easeAmount)
public Spline(float x1,
float y1,
float x2,
float y2)
x1 - X coordinate of the first control pointy1 - Y coordinate of the first control pointx2 - X coordinate of the second control pointy2 - Y coordinate of the second control pointjava.lang.IllegalArgumentException - This exception is thrown when values beyond the allowed [0,1]
range are passed inpublic float map(float lengthFraction)
map in interface TimelineEaselengthFraction - Fraction of time in a given time interval.