Class CannonEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.CannonEffect
Starts the text large and shrinks into the final position/size, arcing up and then ending moving down; may optionally
shake once it arrives at its destination. Doesn't repeat itself.
Parameters:
The
Example usage:
Parameters:
initialStretch;extent;height;shakeDuration;shakePower
The
initialStretch
affects how big the glyphs should be while they are in the "foreground;" defaults to 1.0 .
The extent
extends how long it takes for the glyphs to enter their target positions; defaults to 1.0 .
The height
is how many line-heights the glyphs should arc up and then down; defaults to 1.0 .
The shakeDuration
is how many seconds the glyph should shake after it "hits" its target; defaults to 2.0 .
The shakePower
affects how much each glyph should shake after it "hits" its target; defaults to 1.0 .
Example usage:
{CANNON=0.5;1.5;0.25;0.3;0.2}This text will start smaller, travel faster, arc less, and not shake much.{ENDCANNON}
{CANNON=2.5;0.75;1.5;1.7;2.1}This text will start larger, travel more slowly, arc more, shake longer, and shake much more.{ENDCANNON}
-
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