Class AttentionEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.AttentionEffect
Makes the hovered-over glyph stretch on y, as well as some glyphs near it. Doesn't change over time, but does change
with pointer movement.
Parameters:
The
Example usage:
Parameters:
spread;stretchY
The
spread
is a percentage from 0% to potentially much higher than 100%; it defaults to 500%.
The stretchY
is a percentage from 0% (shrink to nothing) to 100% (no change) to higher, such as 200% to
double the height of affected glyphs.
Example usage:
{ATTENTION=1000;50}Roughly 10 glyphs in either direction will get squashed to a shorter height on mouse-over.{ENDATTENTION}
{ATTENTION=300;200}Roughly 3 glyphs in either direction will stretch to approach double-height on mouse-over.{ENDATTENTION}
-
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