Class HeartbeatEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.HeartbeatEffect
Makes the text expand and shrink like a beating heart.
Parameters:
The
Example usage:
Parameters:
expansion;frequency;duration
The
expansion
is how much the text should expand by, relative to its original size, at most. Defaults to 1.0 .
The frequency
is how quickly the "heart" "beats;" defaults to 1.0, and doesn't use any exact unit.
The duration
is how many seconds the beating-heart should go on, or _
to repeat forever; defaults to
positive infinity.
Example usage:
{HEARTBEAT=0.75;0.5;_}Each glyph here will slowly pulse by a smaller amount forever.{ENDHEARTBEAT}
{HEARTBEAT=2.5;2;5}Each glyph here will pulse quickly by a large amount for 5 seconds total.{ENDHEARTBEAT}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.tommyettinger.textra.Effect
Effect.EffectBuilder
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
onApply
(long glyph, int localIndex, int globalIndex, float delta) Called when this effect should be applied to the given glyph.Methods inherited from class com.github.tommyettinger.textra.Effect
apply, assignTokenName, calculateFadeout, calculateProgress, calculateProgress, calculateProgress, isFinished, paramAsBoolean, paramAsColor, paramAsFloat, update