Class ThinkingEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.ThinkingEffect
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
Parameters:
The
Example usage:
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}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.tommyettinger.textra.Effect
Effect.EffectBuilder
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
onApply
(long glyph, int localIndex, int globalIndex, float delta) Called when this effect should be applied to the given glyph.Methods inherited from class com.github.tommyettinger.textra.Effect
apply, assignTokenName, calculateFadeout, calculateProgress, calculateProgress, calculateProgress, isFinished, paramAsBoolean, paramAsColor, paramAsFloat, update