Class SquashEffect

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

public class SquashEffect extends Effect
Shrinks the text vertically toward the baseline while stretching a little outward horizontally, then returns to normal. Doesn't repeat itself.
Parameters: speed;elastic
The speed affects how fast the glyphs should be squashed down and out; defaults to 0.25 . If elastic is true, the glyphs will wiggle to their squashed and then full size; defaults to false, which uses linear movement.
Example usage: {SQUASH=2.8;y}Each glyph here will wiggle "bouncily" into a squashed size and back again quickly.{ENDSQUASH} {SQUASH=0.3}Each glyph here will very slowly be crushed down to a squashed size and back again.{ENDSQUASH}
  • 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