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(AnimationInstance animationInstance) |
void |
enqueue(int durationMillis,
float[] cuePoints,
List<AnimationInstance.KeyFrame[]> keyFrames)
Add a segment to the animation's queue.
|
EasingFunction |
getEasingFunction() |
int |
getFps() |
boolean |
getLoop() |
int |
getPeriodMs() |
float |
getSpeed()
Get the current speed
|
Collection<OutputDeviceInterface> |
getTargets() |
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 stop()
public float getSpeed()
public int getPeriodMs()
public EasingFunction getEasingFunction()
public Collection<OutputDeviceInterface> getTargets()
public void enqueue(int durationMillis, float[] cuePoints, List<AnimationInstance.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 targetpublic void enqueue(AnimationInstance animationInstance)
Copyright © 2016–2017 mattjlewis. All rights reserved.