Class WaveEffect

java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.WaveEffect

public class WaveEffect extends Effect
Moves the text vertically in a sine wave pattern.
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}
  • Constructor Details

  • Method Details

    • onApply

      protected void onApply(long glyph, int localIndex, int globalIndex, float delta)
      Description copied from class: Effect
      Called when this effect should be applied to the given glyph.
      Specified by:
      onApply in class Effect