Class GradientEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.GradientEffect
Tints the text in a gradient pattern; never ends.
Parameters:
The
Example usage:
Parameters:
color1;color2;distance;frequency
The
color1
can be a named color or hex color; defaults to #FFFFFFFF
(white).
The color2
should be a named color or hex color; defaults to #888888FF
(medium gray).
The distance
rarely needs to be changed from 1, but it affects how much the position of the glyph in the
affected text changes the effect.
The frequency
affects how fast the effect should change; defaults to 1.0 .
Example usage:
{GRADIENT=RED;LIGHT BLUE;1.0;0.3}This text will blend slowly between from red to light blue.{ENDGRADIENT}
{GRADIENT=#111111FF;#EEEEEEFF;1.0;3.0}This text will blend quickly between from dark gray and light gray.{ENDGRADIENT}
-
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