Class AnimationKeyframe.Builder

java.lang.Object
kr.toxicity.model.api.animation.AnimationKeyframe.Builder
Enclosing class:
AnimationKeyframe

public static final class AnimationKeyframe.Builder extends Object
Builder for AnimationKeyframe.

This builder allows for efficient population of keyframe data using primitive arrays.

Since:
2.0.0
  • Method Details

    • write

      public void write(float time, @NotNull @NotNull org.joml.Vector3f position, @NotNull @NotNull org.joml.Vector3f scale, @NotNull @NotNull org.joml.Vector3f rotation, boolean skipInterpolation)
      Writes a keyframe data point.
      Parameters:
      time - the time of the keyframe
      position - the position vector
      scale - the scale vector
      rotation - the rotation vector
      skipInterpolation - whether to skip interpolation for this keyframe
      Since:
      2.0.0
    • build

      @NotNull public @NotNull AnimationKeyframe build()
      Builds the AnimationKeyframe.
      Returns:
      the created keyframe collection
      Since:
      2.0.0