Class OceanEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.OceanEffect
Tints the text in an irregular, flowing color pattern that defaults to using sea green through deep blue, but can be
changed to other colors. This can also make a decent fire effect, or various other natural swirling effects.
Parameters:
The
Example usage:
Parameters:
distance;frequency;hue;saturation;brightness
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 0.25 .
The hue is the middle hue of the colors this uses; it can go up or down by 0.15, wrapping around at 1.0 . Defaults to 0.5 .
The saturation is the saturation of all colors this will use; doesn't vary. Defaults to 0.8 .
The lightness is the middle lightness of the colors this uses; it can go up or down by 0.15, clamping at 0.0 and 1.0 . Defaults to 0.25 .
Example usage:
{OCEAN=1;0.25;0.5;0.8;0.25}This text will slowly shift between darker and lighter blue and blue-green.{ENDGRADIENT}
{OCEAN=0.7;1.25;0.11;1.0;0.65}This text will burn with the cleansing power of fire!{ENDGRADIENT}
-
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