Class JumpEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.JumpEffect
Makes the text jumps and falls as if there was gravity.
Parameters:
The
Example usage:
Parameters:
jumpHeight;frequency;speed;duration
The
jumpHeight
is how many line-heights each glyph should move up (and back down) by; defaults to 1.0 .
The frequency
is how often the glyphs should jump, in a wave; defaults to 1.0 .
The speed
is how quickly each jumping glyph should move; defaults to 1.0 .
The duration
is how many seconds the jumping should go on, or _
to repeat forever; defaults to
positive infinity.
Example usage:
{JUMP=0.5;1.5;0.8;_}Each glyph here will jump a little and with slower movement, but more often; the jumps will go on forever.{ENDJUMP}
{JUMP=2.5;0.25;1.0;5}Each glyph here will jump very high, infrequently, at normal speed, for 5 seconds total.{ENDJUMP}
-
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