Class ZipperEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.ZipperEffect
Moves the text vertically easing it into the final position, alternating glyphs moving down and glyphs moving up.
Doesn't repeat itself. This is similar to
Parameters:
The
Example usage:
EaseEffect
, except that this alternates directions.
Parameters:
distance;extent;elastic
The
distance
is how many line-heights each glyph should move as it gets into position; defaults to 2 .
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:
{ZIPPER=5;2.8;y}Each glyph here will zip elastically into position from very high out, doing so quickly.{ENDZIPPER}
{ZIPPER=-3;0.3}Each glyph here will zip smoothly into place very slowly.{ENDZIPPER}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.tommyettinger.textra.Effect
Effect.EffectBuilder
-
Field Summary
-
Constructor Summary
Constructors -
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