Class SpinEffect

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

public class SpinEffect extends Effect
Rotates each glyph quickly and slows down as it approaches some count of rotations. Doesn't repeat itself.
Parameters: extent;rotations;elastic
The extent affects how long the animation should be extended by (not in any unit); defaults to 1.0 . The rotations affects how many times each glyph should fully rotate before stopping; defaults to 1.0 . If elastic is true, the glyphs will wiggle into their final rotation; defaults to false, which uses linear movement.
Example usage: {SPIN=5;2;y}Each glyph here will wiggle-spin very quickly twice.{ENDSPIN} {SPIN=0.4;6}Each glyph here will spin slowly six times.{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