java.lang.Object
dev.bouncingelf10.timelesslib.api.animation.channels.ChannelVec3

public class ChannelVec3 extends Object
  • Constructor Details

    • ChannelVec3

      public ChannelVec3(String name)
  • Method Details

    • name

      public String name()
    • keyframe

      public ChannelVec3 keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 value)
      Adds a keyframe at the specified time in seconds.
    • keyframe

      public ChannelVec3 keyframe(double timeSeconds, net.minecraft.world.phys.Vec3 value, Easing easing)
      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

      public ChannelVec3 keyframe(Duration duration, net.minecraft.world.phys.Vec3 value)
    • keyframe

      public ChannelVec3 keyframe(Duration duration, net.minecraft.world.phys.Vec3 value, Easing easing)
    • 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

      public ChannelVec3 addKeyframe(KeyframeVec3 keyframe)
      Adds a keyframe using a keyframe object.
      I advise you use the provided methods to create keyframes. (keyframe(double, Vec3), etc.)
    • defaultInterpolation

      public ChannelVec3 defaultInterpolation(Interpolation interpolation)
      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

      public ChannelVec3 defaultEasing(Easing easing)
      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

      public ChannelVec3 bind(Consumer<net.minecraft.world.phys.Vec3> consumer)
      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.