Class LockstepEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.LockstepEffect
Rotates each glyph sharply back and forth, with no smoothing, and all glyphs moving in the same way based on the
current time.
Parameters:
The
Example usage:
Animated preview here.
Parameters:
rotationAmount;tilt;speed;duration
The
rotationAmount is how many degrees a glyph will rotate, going between clockwise, 0, counterclockwise, and
0; default to 15 degrees.
The tilt is how many degrees counterclockwise to rotate the center of the back-and-forth turning; defaults
to +0 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:
{LOCKSTEP=50;0;0.8;_}Each glyph here will rotate a lot, but slowly, and will do so forever.{ENDLOCKSTEP}
{LOCKSTEP=10;20;4;5}Each glyph here will rotate a little, but quickly, for 5 seconds total, with a 20 degree tilt.{ENDLOCKSTEP}
Animated preview here.
-
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 voidonApply(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