Class SlideEffect

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

public class SlideEffect extends Effect
Moves the text horizontally easing it into the final position. Doesn't repeat itself. This is similar to EaseEffect, except that this is horizontal.
Parameters: distance;extent;elastic
The distance is how many line-heights each glyph should move as it gets into position; defaults to 1.0 . The extent affects how long the animation should be extended by (not in any unit); defaults to 1.0 . If elastic is true, the glyphs will wiggle into position; defaults to false, which uses linear movement.
Example usage: {EASE=5;2.8;y}Each glyph here will wiggle into position from very far to the right, doing so quickly.{ENDEASE} {EASE=-2;0.3}Each glyph here will slide into place from the left, very slowly.{ENDEASE}
  • 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