Class SpiralEffect

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

public class SpiralEffect extends Effect
Moves the text in a round spiral from outwards-in, easing it into the final position. Doesn't repeat itself.
Parameters: distance;speed;rotations
The distance is how many line-heights each glyph will move from outwards-in; defaults to 1.0 . The speed affects how fast the glyphs should move; defaults to 1.0 . The rotations affects how many times each glyph should circle its position before stopping; defaults to 1.0 .
Example usage: {SPIN=2.5;5;2}Each glyph here will spiral in twice from fairly far away, very quickly.{ENDSPIN} {SPIN=0.8;0.5;4}Each glyph here will spiral in four times from close-by, slowly.{ENDSPIN}
  • 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