Class ShrinkEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.ShrinkEffect
Starts the text large and shrinks into the final position/size. Doesn't repeat itself.
Parameters:
The
Example usage:
Parameters:
expansion;extent;elastic
The
expansion
is how many line-heights each glyph should be stretched out by at the start; defaults to 1.0 .
The extent
affects how long the animation should be extended by (not in any unit); defaults to 1.0 .
If elastic
is true, the glyphs will wiggle into position; defaults to false, which uses linear movement.
Example usage:
{SHRINK=5;2.8;y}Each glyph here will shrink "bouncily" into position from a very large size, doing so quickly.{ENDSHRINK}
{SHRINK=1.5;0.3}Each glyph here will shrink into position from a somewhat-large size, and very slowly.{ENDSHRINK}
-
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