Class HeartbeatEffect

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

public class HeartbeatEffect extends Effect
Makes the text expand and shrink like a beating heart.
Parameters: expansion;frequency;duration
The expansion is how much the text should expand by, relative to its original size, at most. Defaults to 1.0 . The frequency is how quickly the "heart" "beats;" defaults to 1.0, and doesn't use any exact unit. The duration is how many seconds the beating-heart should go on, or _ to repeat forever; defaults to positive infinity.
Example usage: {HEARTBEAT=0.75;0.5;_}Each glyph here will slowly pulse by a smaller amount forever.{ENDHEARTBEAT} {HEARTBEAT=2.5;2;5}Each glyph here will pulse quickly by a large amount for 5 seconds total.{ENDHEARTBEAT}
  • 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