public class Animator extends java.lang.Object implements Tickable
tick()
method inside a sketch's draw()
to advance
the time for all smoothers.Constructor and Description |
---|
Animator(float smoothness)
Creates an animator with the given smoothness.
|
Modifier and Type | Method and Description |
---|---|
Smoother2D |
make2DSmoother()
Adds a 2D smoother that will be handled by this animator.
|
Smoother3D |
make3DSmoother()
Adds a 3D smoother that will be handled by this animator.
|
Smoother |
makeSmoother()
Adds a smoother that will be handled by this animator.
|
void |
setSmoothness(float smoothness)
Sets the smoothness of all smoothers that have been made by this animator.
|
void |
tick()
Advances time for all smoothers that have been made by this animator.
|
public Animator(float smoothness)
smoothness
- The smoothness of the animator between 0 and 1. A value of 0 has abrupt
changes, 1 is very smooth. A value of 0.9 gives nice workable smoothness
for typical animations.public final Smoother makeSmoother()
public final Smoother2D make2DSmoother()
public final Smoother3D make3DSmoother()
public final void tick()
public final void setSmoothness(float smoothness)
setSmoothness
in interface Tickable
smoothness
- The smoothness of the animator between 0 and 1. A value of 0 has abrupt
changes, 1 is very smooth. A value of 0.9 gives nice workable smoothness
for typical animations.