Class ThinkingEffect

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

public class ThinkingEffect extends Effect
Positions each glyph at random starting points, then has each fade and reappear in the intended position after a short span of time. Doesn't repeat itself. This is similar to MeetEffect, but doesn't move points into their final position (they "blink" out and into their final position, though not instantly).
Parameters: distance;extent;drift;inside
The distance is how many line-heights each glyph should start away from its destination; defaults to 2 . The extent affects how long the animation should be extended by (not in any unit); defaults to 1.0 . The drift is greater than 0, each glyph will move up to that distance (in line-heights) in a random direction before disappearing; defaults to 1.0. If inside is true, glyphs will start a random amount less than distance to their destination; defaults to false.
Example usage: {THINKING=5;10;1;y}Each glyph here will fade into position from very randomly-scattered points, drifting before doing so slowly.{ENDTHINKING} {THINKING=-3;0.3;0}Each glyph here will start at an equal distance and random angle, not drifting and blinking into place very quickly.{ENDTHINKING}
  • 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