Class SpinEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.SpinEffect
Rotates each glyph quickly and slows down as it approaches some count of rotations. Doesn't repeat itself.
Parameters:
The
Example usage:
Parameters:
extent;rotations;elastic
The
extent
affects how long the animation should be extended by (not in any unit); defaults to 1.0 .
The rotations
affects how many times each glyph should fully rotate before stopping; defaults to 1.0 .
If elastic
is true, the glyphs will wiggle into their final rotation; defaults to false, which uses linear movement.
Example usage:
{SPIN=5;2;y}Each glyph here will wiggle-spin very quickly twice.{ENDSPIN}
{SPIN=0.4;6}Each glyph here will spin slowly six times.{ENDSPIN}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.tommyettinger.textra.Effect
Effect.EffectBuilder
-
Field Summary
-
Constructor Summary
-
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