Class ChannelDouble
java.lang.Object
dev.bouncingelf10.timelesslib.api.animation.channels.ChannelDouble
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddKeyframe(KeyframeDouble keyframe) Adds a keyframe using a keyframe object.Binds the channel to a consumer.doubledefaultEasing(Easing easing) Sets the default easing for the channel.defaultInterpolation(Interpolation interpolation) Sets the default interpolation for the channel.voidevaluateAt(double timeSeconds, Interpolation timelineDefaultInterpolation, Easing timelineDefaultEasing) Evaluates the channel at the specified time in seconds.keyframe(double timeSeconds, double value) Adds a keyframe at the specified time in seconds.Adds a keyframe at the specified time in seconds.keyframe(double timeSeconds, double value, Easing easing, Interpolation interpolation) Adds a keyframe at the specified time in seconds.keyframe(double timeSeconds, double value, Interpolation interpolation) Adds a keyframe at the specified time in seconds.keyframe(double timeSeconds, double value, Interpolation interpolation, Easing easing) Adds a keyframe at the specified time in seconds.keyframe(Duration duration, double value, Easing easing, Interpolation interpolation) keyframe(Duration duration, double value, Interpolation interpolation) name()
-
Constructor Details
-
ChannelDouble
-
-
Method Details
-
name
-
keyframe
Adds a keyframe at the specified time in seconds. -
keyframe
Adds a keyframe at the specified time in seconds. Also sets the easing for the keyframe.
Note: Keyframes can override all previous defaults and follow a hierarchy:
AnimationTimeline>ChannelDouble>KeyframeDouble -
keyframe
Adds a keyframe at the specified time in seconds. Also sets the interpolation for the keyframe.
Note: Keyframes can override all previous defaults and follow a hierarchy:
AnimationTimeline>ChannelDouble>KeyframeDouble -
keyframe
public ChannelDouble keyframe(double timeSeconds, double value, Interpolation interpolation, Easing easing) Adds a keyframe at the specified time in seconds. Also sets the interpolation and easing for the keyframe.
Note: Keyframes can override all previous defaults and follow a hierarchy:
AnimationTimeline>ChannelDouble>KeyframeDouble -
keyframe
public ChannelDouble keyframe(double timeSeconds, double value, Easing easing, Interpolation interpolation) Adds a keyframe at the specified time in seconds. Also sets the easing and interpolation for the keyframe.
Note: Keyframes can override all previous defaults and follow a hierarchy:
AnimationTimeline>ChannelDouble>KeyframeDouble -
keyframe
-
keyframe
-
keyframe
-
keyframe
public ChannelDouble keyframe(Duration duration, double value, Easing easing, Interpolation interpolation) -
addKeyframe
Adds a keyframe using a keyframe object.
I advise you use the provided methods to create keyframes. (keyframe(double, double), etc.) -
defaultInterpolation
Sets the default interpolation for the channel.
Note: Channel defaults override timeline defaults but can still be overwritten by keyframes following this hierarchy:
AnimationTimeline>ChannelDouble>KeyframeDouble -
defaultEasing
Sets the default easing for the channel.
Note: Channel defaults override timeline defaults but can still be overwritten by keyframes following this hierarchy:
AnimationTimeline>ChannelDouble>KeyframeDouble -
bind
Binds the channel to a consumer.
This is the way to assign a variable to the output of the channel.
E.g.channel.bind(value -> System.out.println(value));or
channel.bind(myVariable::setValue); -
computeDurationSeconds
public double computeDurationSeconds() -
evaluateAt
public void evaluateAt(double timeSeconds, Interpolation timelineDefaultInterpolation, Easing timelineDefaultEasing) Evaluates the channel at the specified time in seconds. You mostly shouldn't call this method directly.
-