Record Class GuiCaretAnimation
java.lang.Object
java.lang.Record
com.render.api.gui.GuiCaretAnimation
- Record Components:
periodSeconds- complete blink period, or zero for a steady caretvisibleFraction- visible portion of each periodphaseSeconds- phase offset
public record GuiCaretAnimation(double periodSeconds, float visibleFraction, double phaseSeconds)
extends Record
Reusable caret visibility animation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGuiCaretAnimation(double periodSeconds, float visibleFraction, double phaseSeconds) Creates an instance of aGuiCaretAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theperiodSecondsrecord component.doubleReturns the value of thephaseSecondsrecord component.final StringtoString()Returns a string representation of this record class.booleanvisibleAt(double timeSeconds) Samples caret visibility.floatReturns the value of thevisibleFractionrecord component.
-
Field Details
-
STEADY
-
BLINK
-
-
Constructor Details
-
GuiCaretAnimation
public GuiCaretAnimation(double periodSeconds, float visibleFraction, double phaseSeconds) Creates an instance of aGuiCaretAnimationrecord class.- Parameters:
periodSeconds- the value for theperiodSecondsrecord componentvisibleFraction- the value for thevisibleFractionrecord componentphaseSeconds- the value for thephaseSecondsrecord component
-
-
Method Details
-
visibleAt
public boolean visibleAt(double timeSeconds) Samples caret visibility.- Parameters:
timeSeconds- animation time- Returns:
- whether the caret is visible
-
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 with thecomparemethod from their corresponding wrapper classes. -
periodSeconds
public double periodSeconds()Returns the value of theperiodSecondsrecord component.- Returns:
- the value of the
periodSecondsrecord component
-
visibleFraction
public float visibleFraction()Returns the value of thevisibleFractionrecord component.- Returns:
- the value of the
visibleFractionrecord component
-
phaseSeconds
public double phaseSeconds()Returns the value of thephaseSecondsrecord component.- Returns:
- the value of the
phaseSecondsrecord component
-