Class ChannelVec3
java.lang.Object
dev.bouncingelf10.timelesslib.api.animation.channels.ChannelVec3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddKeyframe(KeyframeVec3 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, net.minecraft.world.phys.Vec3 value) Adds a keyframe at the specified time in seconds.Adds a keyframe at the specified time in seconds.keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 value, Easing easing, Interpolation interpolation) Adds a keyframe at the specified time in seconds.keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 value, Interpolation interpolation) Adds a keyframe at the specified time in seconds.keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 value, Interpolation interpolation, Easing easing) Adds a keyframe at the specified time in seconds.keyframe(Duration duration, net.minecraft.world.phys.Vec3 value, Easing easing, Interpolation interpolation) keyframe(Duration duration, net.minecraft.world.phys.Vec3 value, Interpolation interpolation) name()
-
Constructor Details
-
ChannelVec3
-
-
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>ChannelVec3>KeyframeVec3 -
keyframe
public ChannelVec3 keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 value, Interpolation interpolation) 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>ChannelVec3>KeyframeVec3 -
keyframe
public ChannelVec3 keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 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>ChannelVec3>KeyframeVec3 -
keyframe
public ChannelVec3 keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 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>ChannelVec3>KeyframeVec3 -
keyframe
-
keyframe
-
keyframe
public ChannelVec3 keyframe(Duration duration, net.minecraft.world.phys.Vec3 value, Interpolation interpolation) -
keyframe
public ChannelVec3 keyframe(Duration duration, net.minecraft.world.phys.Vec3 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, Vec3), 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>ChannelVec3>KeyframeVec3 -
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>ChannelVec3>KeyframeVec3 -
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.
-