Class AnimationGenerator
java.lang.Object
kr.toxicity.model.api.data.blueprint.AnimationGenerator
Generates animation data by interpolating keyframes and calculating bone movements.
This class processes raw animation points and generates smooth transitions for position, rotation, and scale. It handles the creation of intermediate frames to ensure fluid motion, especially for rotations.
- Since:
- 1.15.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Map<BoneName, BlueprintAnimator> createMovements(float length, @NotNull List<BlueprintElement> children, @NotNull Map<BoneName, BlueprintAnimator.AnimatorData> pointMap) Creates a map of blueprint animators from the provided animation data.voidinterpolateRotation(@NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet floats) Inserts additional keyframes to smooth out large rotations.voidinterpolateStep(@NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet floats) Inserts keyframes for step interpolation (non-continuous transitions).
-
Method Details
-
createMovements
@NotNull public static @NotNull Map<BoneName,BlueprintAnimator> createMovements(float length, @NotNull @NotNull List<BlueprintElement> children, @NotNull @NotNull Map<BoneName, BlueprintAnimator.AnimatorData> pointMap) Creates a map of blueprint animators from the provided animation data.This method calculates all necessary interpolation frames and builds the final animation structures for each bone.
- Parameters:
length- the total length of the animation in secondschildren- the list of root blueprint elements (bones)pointMap- a map containing raw animation data for each bone- Returns:
- a map of generated blueprint animators keyed by bone name
- Since:
- 1.15.2
-
interpolateRotation
public void interpolateRotation(@NotNull @NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet floats) Inserts additional keyframes to smooth out large rotations.This ensures that rotations larger than 90 degrees between frames are broken down into smaller steps.
- Parameters:
floats- the set of keyframe times to update- Since:
- 1.15.2
-
interpolateStep
public void interpolateStep(@NotNull @NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet floats) Inserts keyframes for step interpolation (non-continuous transitions).- Parameters:
floats- the set of keyframe times to update- Since:
- 1.15.2
-