Class ShrinkEffect

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

public class ShrinkEffect extends Effect
Starts the text large and shrinks into the final position/size. Doesn't repeat itself.
Parameters: expansion;extent;elastic
The expansion is how many line-heights each glyph should be stretched out by at the start; 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: {SHRINK=5;2.8;y}Each glyph here will shrink "bouncily" into position from a very large size, doing so quickly.{ENDSHRINK} {SHRINK=1.5;0.3}Each glyph here will shrink into position from a somewhat-large size, and very slowly.{ENDSHRINK}
  • 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