public class MoveToDoubleAnimator extends DoubleAnimator
(1.0-smoothing)
as the interpolant, until the difference between the current
value and the target(end) value is less than the minEpsilon
value.Modifier and Type | Field and Description |
---|---|
protected double |
minEpsilon
The amount of delta between the end value and the current value that is required to stop the animation.
|
protected double |
smoothing
The amount of smoothing.
|
begin, end, propertyAccessor
interpolator
Constructor and Description |
---|
MoveToDoubleAnimator(java.lang.Double end,
double smoothing,
double minEpsilon,
PropertyAccessor.DoubleAccessor propertyAccessor)
Construct a
MoveToDoubleAnimator |
MoveToDoubleAnimator(java.lang.Double end,
double smoothing,
PropertyAccessor.DoubleAccessor propertyAccessor)
Construct a
MoveToDoubleAnimator |
Modifier and Type | Method and Description |
---|---|
void |
next()
Set the value to the next value in the animation.
|
java.lang.Double |
nextDouble(double interpolant)
Get the next value using the given interpolantto perform a linear interplation.
|
getBegin, getEnd, getPropertyAccessor, setBegin, setEnd, setImpl
flagLastStateInvalid, hasNext, isLastStateValid, isStopOnInvalidState, set, setStopOnInvalidState, start, stop
protected double minEpsilon
protected double smoothing
public MoveToDoubleAnimator(java.lang.Double end, double smoothing, double minEpsilon, PropertyAccessor.DoubleAccessor propertyAccessor)
MoveToDoubleAnimator
end
- The target value, the value to animate to.smoothing
- smoothing The smoothing factor. A number between 0 and 1. The higher the number the
greater the smoothing.minEpsilon
- The minimum difference between the current value and the target value that triggers the
end of the animation. Defaults to .001.propertyAccessor
- The double accessor used to access the animated value.public MoveToDoubleAnimator(java.lang.Double end, double smoothing, PropertyAccessor.DoubleAccessor propertyAccessor)
MoveToDoubleAnimator
end
- The target value, the value to animate to.smoothing
- The smoothing factor. A number between 0 and 1. The higher the number the greater the
smoothing.propertyAccessor
- The accessor used to access the animated value.public void next()
1.0-smoothing
as the interpolant.next
in interface Animator
next
in class BasicAnimator
public java.lang.Double nextDouble(double interpolant)
nextDouble
in class DoubleAnimator
interpolant
- The inerpolant to be used to perform the interpolation. A number between 0 and 1.