public class Tweens
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Tween |
callMethod(java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
Creates a Tween that will call the specified method and optional arguments
whenever supplied a time value greater than or equal to 0.
|
static Tween |
callTweenMethod(double length,
java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
Creates a Tween that will call the specified method and optional arguments,
including the time value scaled between 0 and 1.
|
static Tween |
cycle(Tween delegate)
Creates a tween that will cycle back and forth the specified delegate tween.
|
static Tween |
delay(double length)
Creates a tween that will perform a no-op until the length
has expired.
|
static Tween |
invert(Tween delegate)
Creates a tween that inverts the specified delegate tween.
|
static Tween |
loopCount(int count,
Tween... delegates)
Creates a tween that loops the specified delegate tween or tweens
to the desired count.
|
static Tween |
loopDuration(double duration,
Tween... delegates)
Creates a tween that loops the specified delegate tween or tweens
to the desired duration.
|
static Tween |
parallel(Tween... delegates)
Creates a tween that will interpolate over an entire list
of tweens in parallel, ie: all tweens will be run at the same
time.
|
static Tween |
sequence(Tween... delegates)
Creates a tween that will interpolate over an entire sequence
of tweens in order.
|
static Tween |
sineStep(Tween... delegates)
Creates a tween that uses a sine function to smooth step the time value
for the specified delegate tween or tweens.
|
static Tween |
smoothStep(Tween... delegates)
Creates a tween that uses a hermite function to smooth step the time value
for the specified delegate tween or tweens.
|
static Tween |
stretch(double desiredLength,
Tween... delegates)
Creates a tween that scales the specified delegate tween or tweens
to the desired length.
|
public static Tween sequence(Tween... delegates)
delegates
- the desired sequence of tweenspublic static Tween parallel(Tween... delegates)
delegates
- the tweens to be interpolatedpublic static Tween delay(double length)
length
- the desired duration (in seconds)public static Tween stretch(double desiredLength, Tween... delegates)
desiredLength
- the desired duration (in seconds)delegates
- the desired sequence of tweenspublic static Tween sineStep(Tween... delegates)
delegates
- the desired sequence of tweenspublic static Tween smoothStep(Tween... delegates)
delegates
- the desired sequence of tweenspublic static Tween callMethod(java.lang.Object target, java.lang.String method, java.lang.Object... args)
target
- object on which the method is to be invokedmethod
- name of the method to be invokedargs
- arguments to be passed to the methodpublic static Tween callTweenMethod(double length, java.lang.Object target, java.lang.String method, java.lang.Object... args)
For example:
Tweens.callTweenMethod(1, myObject, "foo", "bar")
Would work for any of the following method signatures:
void foo(float t, String arg) void foo(double t, String arg) void foo(String arg, float t) void foo(String arg, double t)
length
- the desired duration (in seconds)target
- object on which the method is to be invokedmethod
- name of the method to be invokedargs
- additional arguments to be passed to the methodpublic static Tween loopCount(int count, Tween... delegates)
count
- the desired loop countdelegates
- the desired sequence of tweenspublic static Tween loopDuration(double duration, Tween... delegates)
duration
- the desired durationdelegates
- the desired sequence of tweenspublic static Tween invert(Tween delegate)
delegate
- the desired tween