Class SquashEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.SquashEffect
Shrinks the text vertically toward the baseline while stretching a little outward horizontally, then returns to
normal. Doesn't repeat itself.
Parameters:
The
Example usage:
Parameters:
speed;elastic
The
speed
affects how fast the glyphs should be squashed down and out; defaults to 0.25 .
If elastic
is true, the glyphs will wiggle to their squashed and then full size; defaults to false, which uses linear movement.
Example usage:
{SQUASH=2.8;y}Each glyph here will wiggle "bouncily" into a squashed size and back again quickly.{ENDSQUASH}
{SQUASH=0.3}Each glyph here will very slowly be crushed down to a squashed size and back again.{ENDSQUASH}
-
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