Class JumpEffect

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

public class JumpEffect extends Effect
Makes the text jumps and falls as if there was gravity.
Parameters: jumpHeight;frequency;speed;duration
The jumpHeight is how many line-heights each glyph should move up (and back down) by; defaults to 1.0 . The frequency is how often the glyphs should jump, in a wave; defaults to 1.0 . The speed is how quickly each jumping glyph should move; defaults to 1.0 . The duration is how many seconds the jumping should go on, or _ to repeat forever; defaults to positive infinity.
Example usage: {JUMP=0.5;1.5;0.8;_}Each glyph here will jump a little and with slower movement, but more often; the jumps will go on forever.{ENDJUMP} {JUMP=2.5;0.25;1.0;5}Each glyph here will jump very high, infrequently, at normal speed, for 5 seconds total.{ENDJUMP}
  • 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