Class SputterEffect

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

public class SputterEffect extends Effect
Scales each glyph randomly, with each one scaled independently.
Parameters: widen;heighten;speed;duration
The widen value is the fraction of the original width a glyph can stretch or shrink on x by; defaults to 0.25 . The heighten value is the fraction of the original height a glyph can stretch or shrink on y by; defaults to 0.25 . The speed affects how fast the glyphs should change size; defaults to 1.0 . The duration is how many seconds the effect should repeat, or _ to repeat forever; defaults to positive infinity.
Example usage: {SPUTTER=50;0.8;_}Each glyph here will rotate a lot, but slowly, and will do so forever.{ENDSPUTTER} {SPUTTER=10;4;5}Each glyph here will rotate a little, but quickly, for 5 seconds total.{ENDSPUTTER}
  • 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