Class HangEffect

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

public class HangEffect extends Effect
Hangs the text in midair and suddenly drops it. Doesn't repeat itself. See also SlamEffect, which is similar but starts elevated (instead of rising up), and shakes at the end.
Parameters: distance;extent
The distance is how many line-heights the glyphs should move up before dropping down; defaults to 1.0 . The extent affects how long the animation should be extended by (not in any unit); defaults to 1.0 .
Example usage: {HANG=2.0;1.3}Each glyph here will hang higher and drop a little more quickly.{ENDHANG} {HANG=-0.5;3.0}Each glyph here will pop up quickly from a short distance below, instead of dropping down.{ENDHANG}
  • 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