Class WindEffect

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

public class WindEffect extends Effect
Moves the text as if it is being blown around by wind.
Parameters: distanceX;distanceY;spacing;intensity;duration
The distanceX is how many line-heights each glyph should move left and right by; defaults to 1.0 . The distanceX is how many line-heights each glyph should move up and down by; defaults to 1.0 . The spacing affects how much space there should be between stronger gusts; defaults to 1.0 . The intensity is how strongly the wind should appear to push on each glyph; defaults to 1.0 . The duration is how many seconds the wind should go on, or _ to repeat forever; defaults to positive infinity.
Example usage: {WIND=2;4;0.5;0.5;_}Glyphs here will move more vertically than horizontally, with little spacing and lower intensity; the wind will go on forever.{ENDWIND} {WIND=3;0.5;2.5;1.5;10}Glyphs here will move much more horizontally than vertically, with more spacing and stronger intensity; the wind will go on for 10 seconds.{ENDWIND}
  • Constructor Details

  • Method Details

    • update

      public void update(float delta)
      Overrides:
      update in class Effect
    • 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