Class WaveEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.WaveEffect
Moves the text vertically in a sine wave pattern.
Parameters:
The
Example usage:
Parameters:
distance;frequency;speed;duration
The
distance is how many line-heights each glyph should move up and down by; defaults to 1.0 .
The frequency is how often the glyphs should rise and fall, in a wave; defaults to 1.0 .
The speed is how quickly each glyph should move; defaults to 1.0 .
The duration is how many seconds the wave should go on, or _ to repeat forever; defaults to
positive infinity.
Example usage:
{WAVE=0.5;1.5;0.8;_}Each glyph here will rise/fall a little and with slower movement, but more often; the wave will go on forever.{ENDWAVE}
{WAVE=2.5;0.25;1.0;5}Each glyph here will rise/fall a lot, infrequently, at normal speed, for 5 seconds total.{ENDWAVE}
-
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 voidonApply(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