Class HangEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.HangEffect
Hangs the text in midair and suddenly drops it. Doesn't repeat itself.
See also
Parameters:
The
Example usage:
SlamEffect
, which is similar but starts elevated (instead of rising up), and shakes at the end.
Parameters:
distance;extent
The
distance
is how many line-heights the glyphs should move up before dropping down; defaults to 1.0 .
The extent
affects how long the animation should be extended by (not in any unit); defaults to 1.0 .
Example usage:
{HANG=2.0;1.3}Each glyph here will hang higher and drop a little more quickly.{ENDHANG}
{HANG=-0.5;3.0}Each glyph here will pop up quickly from a short distance below, instead of dropping down.{ENDHANG}
-
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