Class CrowdEffect

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

public class CrowdEffect extends Effect
Rotates each glyph slightly back and forth, each one independently and randomly based on the current time.
Parameters: rotationAmount;speed;duration
The rotationAmount is how many degrees a glyph is allowed to rotate clockwise or counterclockwise; defaults to 15 degrees. The speed affects how fast the glyphs should rotate; defaults to 1.0 . The duration is how many seconds the effect should repeat, or _ to repeat forever; defaults to positive infinity.
Example usage: {CROWD=50;0.8;_}Each glyph here will rotate a lot, but slowly, and will do so forever.{ENDCROWD} {CROWD=10;4;5}Each glyph here will rotate a little, but quickly, for 5 seconds total.{ENDCROWD}
  • 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