Class SlipEffect

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

public class SlipEffect extends Effect
Adds a small value to each glyph's x-offset, each one independently and randomly based on the current time.
Parameters: distance;speed;duration
The distance determines how far a glyph can be offset from its original position, in viewport units; defaults to 5. The speed affects how fast the glyphs should change position; defaults to 1.0 . The duration is how many seconds the effect should repeat, or _ to repeat forever; defaults to positive infinity.
Example usage: {SLIP=5;0.8;_}Each glyph here will slip a lot, but slowly, and will do so forever.{ENDSLIP} {SLIP=0.25;4;5}Each glyph here will slip a little, but quickly, for 5 seconds total.{ENDSLIP}
  • 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