Package me.deecaad.core.transition
Record Class Keyframe<T>
java.lang.Object
java.lang.Record
me.deecaad.core.transition.Keyframe<T>
- Record Components:
time- Normalized time in[0, 1]. The first keyframe in a transition must havetime == 0; the last must havetime == 1.value- The non-null value attime.easingToNext- The non-null easing applied along the segment from THIS keyframe to the next. Ignored on the last keyframe.
One sample in a
Transition: the normalized time at which value should be
reached, and the easingToNext curve that shapes how the previous segment approaches this
keyframe.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull EasingReturns the value of theeasingToNextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubletime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Keyframe
Creates an instance of aKeyframerecord class.- Parameters:
time- the value for thetimerecord componentvalue- the value for thevaluerecord componenteasingToNext- the value for theeasingToNextrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
time
public double time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
easingToNext
Returns the value of theeasingToNextrecord component.- Returns:
- the value of the
easingToNextrecord component
-