Record Class KeyframeInterpolator
java.lang.Object
java.lang.Record
cromveil.combatnumbers.animation.KeyframeInterpolator
- All Implemented Interfaces:
Interpolator
public record KeyframeInterpolator(List<KeyframeDef> keyframes, Easing fallbackEasing, ComposeMode compose)
extends Record
implements Interpolator
-
Constructor Summary
ConstructorsConstructorDescriptionKeyframeInterpolator(List<KeyframeDef> keyframes, Easing fallbackEasing, ComposeMode compose) Creates an instance of aKeyframeInterpolatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncompose()Returns the value of thecomposerecord component.floatendValue()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallbackEasingrecord component.static KeyframeInterpolatorfromValues(float[] values, float[] times, List<Easing> easings, Easing fallback, ComposeMode compose) static KeyframeInterpolatorfromValues(float[] values, Easing fallback, ComposeMode compose) final inthashCode()Returns a hash code value for this object.Returns the value of thekeyframesrecord component.floatfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyframeInterpolator
public KeyframeInterpolator(List<KeyframeDef> keyframes, Easing fallbackEasing, ComposeMode compose) Creates an instance of aKeyframeInterpolatorrecord class.- Parameters:
keyframes- the value for thekeyframesrecord componentfallbackEasing- the value for thefallbackEasingrecord componentcompose- the value for thecomposerecord component
-
-
Method Details
-
fromValues
public static KeyframeInterpolator fromValues(float[] values, float[] times, List<Easing> easings, Easing fallback, ComposeMode compose) -
fromValues
-
startValue
public float startValue()- Specified by:
startValuein interfaceInterpolator
-
endValue
public float endValue()- Specified by:
endValuein interfaceInterpolator
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
keyframes
Returns the value of thekeyframesrecord component.- Returns:
- the value of the
keyframesrecord component
-
fallbackEasing
Returns the value of thefallbackEasingrecord component.- Returns:
- the value of the
fallbackEasingrecord component
-
compose
Returns the value of thecomposerecord component.- Specified by:
composein interfaceInterpolator- Returns:
- the value of the
composerecord component
-