public class Animation extends Object implements Runnable
Constructor and Description |
---|
Animation(Collection<OutputDeviceInterface> targets,
int fps,
EasingFunction easing,
float speed) |
Modifier and Type | Method and Description |
---|---|
void |
enqueue(AnimationObject animationObject) |
void |
enqueue(int durationMillis,
float[] cuePoints,
List<AnimationObject.KeyFrame[]> keyFrames)
Add a segment to the animation's queue.
|
int |
getFps() |
boolean |
getLoop() |
float |
getSpeed()
Get the current speed
|
void |
next()
Jump to the next segment in the queue.
|
void |
pause()
Pause an animation while retaining the current progress and segment
queue.
|
Future<?> |
play()
Play the animation.
|
void |
run() |
void |
setLoop(boolean loop) |
void |
stop()
Immediately stop the animation and flush the segment queue.
|
public Animation(Collection<OutputDeviceInterface> targets, int fps, EasingFunction easing, float speed)
public int getFps()
public boolean getLoop()
public void setLoop(boolean loop)
public Future<?> play()
public void pause()
public void stop()
public void next()
public float getSpeed()
public void enqueue(AnimationObject animationObject)
public void enqueue(int durationMillis, float[] cuePoints, List<AnimationObject.KeyFrame[]> keyFrames)
durationMillis
- Time in milliseconds for the entire animationcuePoints
- List of relative time points at which to change to the next
segmentkeyFrames
- List of segment values for targetCopyright © 2016–2017 mattjlewis. All rights reserved.