Skip to content

Commit

Permalink
Release 0.5.1 !
Browse files Browse the repository at this point in the history
Former-commit-id: dceff2f
  • Loading branch information
tommyettinger committed May 25, 2022
1 parent 7f25719 commit 95d0484
Show file tree
Hide file tree
Showing 68 changed files with 2,623 additions and 211 deletions.
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,13 @@ games, and it looks like a typewriter is putting up each letter at some slower-t
Yes, it has more than the typewriter mode! Text can hang above and then drop into place. It can jump up and down in a
long wave. It can waver and shudder, as if it is sick. It can blink in different colors, move in a gradient smoothly
between two colors, or go across a whole rainbow. Lots of options; lots of fun. Effects are almost the same as in
typing-label, so you should consult [its documentation](https://github.com/rafaskb/typing-label/wiki/Examples) for now.
typing-label, but there have been some changes. You can check [the TextraTypist wiki](https://github.com/tommyettinger/textratypist/wiki/Examples)
for more information.

There are two new effects so far. One is `{JOLT}`, which randomly chooses glyphs over time to get "shocked," shaking
them as with the `{SHAKE}` effect briefly and optionally changing their color while shocked. It takes distance (often
1), intensity (often 1), duration (often "inf" to make it last forever), likelihood (a low float between 0 and 1, with
higher values making more glyphs get shocked), base color and jolting color. The other new effect is `{SPIRAL}`, which
is like the `{SLIDE}` effect but has glyphs start some distance outside of their starting position, and move in a circle
as they go inward to reach their final place. It takes an initial distance (often 1, in multiples of the current line
height), an intensity/speed (higher than 1 is faster than normal, less than 1 is slower than normal), and a rotation
count (in the number of turns to make; this can be any float, and while positive values rotate counter-clockwise,
negative ones rotate clockwise).

I'll probably clone the typing-label wiki at some point and update the relevant parts for the way this library works,
but I haven't done this yet.
As of 0.5.1, there are many new effects. Jolt, Spiral, Spin, Crowd, Shrink, Emerge, Heartbeat, Carousel, and Squash are
all new to TextraTypist (not in typing-label). You can see usage instructions and sample GIFs at
[the TextraTypist wiki's Tokens page](https://github.com/tommyettinger/textratypist/wiki/Tokens). Most of these effects
make use of the smooth scaling and rotation options that effects can use starting in TextraTypist 0.5.1 .

## And now, it's got style!

Expand Down Expand Up @@ -70,11 +63,13 @@ square brackets like `[*]`, or you can use `{STYLE=BOLD}` to do the same thing.
- By default, this looks up COLORNAME in libGDX's `Colors` class, but it can be configured to create colors differently.
- You can use `Font`'s `setColorLookup()` method with your own `ColorLookup` implementation to do what you want here.
- `TypingLabel` does still try to look up color names in `Colors`, but will fall back to using whatever `ColorLookup`
a `Font` uses. You can clear the known names with `Colors.getColors().clear()`, which will force a `ColorLookup` to be used.
a `Font` uses. You can clear the known names with `Colors.getColors().clear()`, which will force a `ColorLookup` to be used.
- The name can optionally be preceded by `|`, which allows looking up colors with names that contain punctuation.
For example, `[|;_;]` would look up a color called `;_;`, "the color of sadness," and would not act like `[;]`.
For example, `[|;_;]` would look up a color called `;_;`, "the color of sadness," and would not act like `[;]`.
- This also can be used with a color tag, such as `{COLOR=SKY}` (which Colors can handle right away) or
`{COLOR=Lighter Orange-Red}` (which would need that color to be defined).
- One way colors such as `Lighter Orange-Red` can be defined is done in [SquidSquad](https://github.com/yellowstonegames/SquidSquad),
which defines its own `ColorLookup`.

## But wait, there's fonts!

Expand Down Expand Up @@ -131,7 +126,7 @@ for some usage. A counterpart to `TextArea` is planned.
You probably want to get this with Gradle! The dependency for a libGDX project's core module looks like:

```groovy
implementation "com.github.tommyettinger:textratypist:0.5.0"
implementation "com.github.tommyettinger:textratypist:0.5.1"
```

This assumes you already depend on libGDX; TextraTypist depends on version 1.11.0 or higher. The requirement for 1.11.0
Expand All @@ -140,7 +135,7 @@ was added in TextraTypist 0.5.0 because of some breaking changes in tooltip code
If you use GWT, this should be compatible. It needs these dependencies in the html module:

```groovy
implementation "com.github.tommyettinger:textratypist:0.5.0:sources"
implementation "com.github.tommyettinger:textratypist:0.5.1:sources"
implementation "com.github.tommyettinger:regexodus:0.1.13:sources"
```

Expand Down
9 changes: 8 additions & 1 deletion docs/apidocs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Classes (textratypist 0.5.0 API)</title>
<title>All Classes (textratypist 0.5.1 API)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand All @@ -13,18 +13,22 @@ <h1 class="bar">All&nbsp;Classes</h1>
<ul>
<li><a href="com/github/tommyettinger/textra/effects/BlinkEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">BlinkEffect</a></li>
<li><a href="com/github/tommyettinger/textra/utils/BlockUtils.html" title="class in com.github.tommyettinger.textra.utils" target="classFrame">BlockUtils</a></li>
<li><a href="com/github/tommyettinger/textra/effects/CarouselEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">CarouselEffect</a></li>
<li><a href="com/github/tommyettinger/textra/ColorLookup.html" title="interface in com.github.tommyettinger.textra" target="classFrame"><span class="interfaceName">ColorLookup</span></a></li>
<li><a href="com/github/tommyettinger/textra/ColorLookup.GdxColorLookup.html" title="class in com.github.tommyettinger.textra" target="classFrame">ColorLookup.GdxColorLookup</a></li>
<li><a href="com/github/tommyettinger/textra/utils/ColorUtils.html" title="class in com.github.tommyettinger.textra.utils" target="classFrame">ColorUtils</a></li>
<li><a href="com/github/tommyettinger/textra/effects/CrowdEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">CrowdEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/EaseEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">EaseEffect</a></li>
<li><a href="com/github/tommyettinger/textra/Effect.html" title="class in com.github.tommyettinger.textra" target="classFrame">Effect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/EmergeEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">EmergeEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/FadeEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">FadeEffect</a></li>
<li><a href="com/github/tommyettinger/textra/Font.html" title="class in com.github.tommyettinger.textra" target="classFrame">Font</a></li>
<li><a href="com/github/tommyettinger/textra/Font.DistanceFieldType.html" title="enum in com.github.tommyettinger.textra" target="classFrame">Font.DistanceFieldType</a></li>
<li><a href="com/github/tommyettinger/textra/Font.FontFamily.html" title="class in com.github.tommyettinger.textra" target="classFrame">Font.FontFamily</a></li>
<li><a href="com/github/tommyettinger/textra/Font.GlyphRegion.html" title="class in com.github.tommyettinger.textra" target="classFrame">Font.GlyphRegion</a></li>
<li><a href="com/github/tommyettinger/textra/effects/GradientEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">GradientEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/HangEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">HangEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/HeartbeatEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">HeartbeatEffect</a></li>
<li><a href="com/github/tommyettinger/textra/ImageTextraButton.html" title="class in com.github.tommyettinger.textra" target="classFrame">ImageTextraButton</a></li>
<li><a href="com/github/tommyettinger/textra/effects/JoltEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">JoltEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/JumpEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">JumpEffect</a></li>
Expand All @@ -34,9 +38,12 @@ <h1 class="bar">All&nbsp;Classes</h1>
<li><a href="com/github/tommyettinger/textra/utils/NoiseUtils.html" title="class in com.github.tommyettinger.textra.utils" target="classFrame">NoiseUtils</a></li>
<li><a href="com/github/tommyettinger/textra/effects/RainbowEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">RainbowEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/ShakeEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">ShakeEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/ShrinkEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">ShrinkEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SickEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">SickEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SlideEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">SlideEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SpinEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">SpinEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SpiralEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">SpiralEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SquashEffect.html" title="class in com.github.tommyettinger.textra.effects" target="classFrame">SquashEffect</a></li>
<li><a href="com/github/tommyettinger/textra/TextraButton.html" title="class in com.github.tommyettinger.textra" target="classFrame">TextraButton</a></li>
<li><a href="com/github/tommyettinger/textra/TextraCheckBox.html" title="class in com.github.tommyettinger.textra" target="classFrame">TextraCheckBox</a></li>
<li><a href="com/github/tommyettinger/textra/TextraDialog.html" title="class in com.github.tommyettinger.textra" target="classFrame">TextraDialog</a></li>
Expand Down
9 changes: 8 additions & 1 deletion docs/apidocs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Classes (textratypist 0.5.0 API)</title>
<title>All Classes (textratypist 0.5.1 API)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand All @@ -13,18 +13,22 @@ <h1 class="bar">All&nbsp;Classes</h1>
<ul>
<li><a href="com/github/tommyettinger/textra/effects/BlinkEffect.html" title="class in com.github.tommyettinger.textra.effects">BlinkEffect</a></li>
<li><a href="com/github/tommyettinger/textra/utils/BlockUtils.html" title="class in com.github.tommyettinger.textra.utils">BlockUtils</a></li>
<li><a href="com/github/tommyettinger/textra/effects/CarouselEffect.html" title="class in com.github.tommyettinger.textra.effects">CarouselEffect</a></li>
<li><a href="com/github/tommyettinger/textra/ColorLookup.html" title="interface in com.github.tommyettinger.textra"><span class="interfaceName">ColorLookup</span></a></li>
<li><a href="com/github/tommyettinger/textra/ColorLookup.GdxColorLookup.html" title="class in com.github.tommyettinger.textra">ColorLookup.GdxColorLookup</a></li>
<li><a href="com/github/tommyettinger/textra/utils/ColorUtils.html" title="class in com.github.tommyettinger.textra.utils">ColorUtils</a></li>
<li><a href="com/github/tommyettinger/textra/effects/CrowdEffect.html" title="class in com.github.tommyettinger.textra.effects">CrowdEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/EaseEffect.html" title="class in com.github.tommyettinger.textra.effects">EaseEffect</a></li>
<li><a href="com/github/tommyettinger/textra/Effect.html" title="class in com.github.tommyettinger.textra">Effect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/EmergeEffect.html" title="class in com.github.tommyettinger.textra.effects">EmergeEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/FadeEffect.html" title="class in com.github.tommyettinger.textra.effects">FadeEffect</a></li>
<li><a href="com/github/tommyettinger/textra/Font.html" title="class in com.github.tommyettinger.textra">Font</a></li>
<li><a href="com/github/tommyettinger/textra/Font.DistanceFieldType.html" title="enum in com.github.tommyettinger.textra">Font.DistanceFieldType</a></li>
<li><a href="com/github/tommyettinger/textra/Font.FontFamily.html" title="class in com.github.tommyettinger.textra">Font.FontFamily</a></li>
<li><a href="com/github/tommyettinger/textra/Font.GlyphRegion.html" title="class in com.github.tommyettinger.textra">Font.GlyphRegion</a></li>
<li><a href="com/github/tommyettinger/textra/effects/GradientEffect.html" title="class in com.github.tommyettinger.textra.effects">GradientEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/HangEffect.html" title="class in com.github.tommyettinger.textra.effects">HangEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/HeartbeatEffect.html" title="class in com.github.tommyettinger.textra.effects">HeartbeatEffect</a></li>
<li><a href="com/github/tommyettinger/textra/ImageTextraButton.html" title="class in com.github.tommyettinger.textra">ImageTextraButton</a></li>
<li><a href="com/github/tommyettinger/textra/effects/JoltEffect.html" title="class in com.github.tommyettinger.textra.effects">JoltEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/JumpEffect.html" title="class in com.github.tommyettinger.textra.effects">JumpEffect</a></li>
Expand All @@ -34,9 +38,12 @@ <h1 class="bar">All&nbsp;Classes</h1>
<li><a href="com/github/tommyettinger/textra/utils/NoiseUtils.html" title="class in com.github.tommyettinger.textra.utils">NoiseUtils</a></li>
<li><a href="com/github/tommyettinger/textra/effects/RainbowEffect.html" title="class in com.github.tommyettinger.textra.effects">RainbowEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/ShakeEffect.html" title="class in com.github.tommyettinger.textra.effects">ShakeEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/ShrinkEffect.html" title="class in com.github.tommyettinger.textra.effects">ShrinkEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SickEffect.html" title="class in com.github.tommyettinger.textra.effects">SickEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SlideEffect.html" title="class in com.github.tommyettinger.textra.effects">SlideEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SpinEffect.html" title="class in com.github.tommyettinger.textra.effects">SpinEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SpiralEffect.html" title="class in com.github.tommyettinger.textra.effects">SpiralEffect</a></li>
<li><a href="com/github/tommyettinger/textra/effects/SquashEffect.html" title="class in com.github.tommyettinger.textra.effects">SquashEffect</a></li>
<li><a href="com/github/tommyettinger/textra/TextraButton.html" title="class in com.github.tommyettinger.textra">TextraButton</a></li>
<li><a href="com/github/tommyettinger/textra/TextraCheckBox.html" title="class in com.github.tommyettinger.textra">TextraCheckBox</a></li>
<li><a href="com/github/tommyettinger/textra/TextraDialog.html" title="class in com.github.tommyettinger.textra">TextraDialog</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ColorLookup.GdxColorLookup (textratypist 0.5.0 API)</title>
<title>ColorLookup.GdxColorLookup (textratypist 0.5.1 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ColorLookup.GdxColorLookup (textratypist 0.5.0 API)";
parent.document.title="ColorLookup.GdxColorLookup (textratypist 0.5.1 API)";
}
}
catch(err) {
Expand Down Expand Up @@ -120,7 +120,7 @@ <h2 title="Class ColorLookup.GdxColorLookup" class="title">Class ColorLookup.Gdx
implements <a href="../../../../com/github/tommyettinger/textra/ColorLookup.html" title="interface in com.github.tommyettinger.textra">ColorLookup</a></pre>
<div class="block">The default ColorLookup, this simply looks up <code>key</code> in <code>Colors</code>, returning 256 (fully transparent,
extremely dark blue) if no Color exists by that exact name (case-sensitive), or returning the RGBA8888 value
of the color otherwise.</div>
of the color otherwise. All color names are <code>ALL_CAPS</code> in libGDX's Colors collection by default.</div>
</li>
</ul>
</div>
Expand Down
7 changes: 4 additions & 3 deletions docs/apidocs/com/github/tommyettinger/textra/ColorLookup.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ColorLookup (textratypist 0.5.0 API)</title>
<title>ColorLookup (textratypist 0.5.1 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ColorLookup (textratypist 0.5.0 API)";
parent.document.title="ColorLookup (textratypist 0.5.1 API)";
}
}
catch(err) {
Expand Down Expand Up @@ -105,7 +105,8 @@ <h2 title="Interface ColorLookup" class="title">Interface ColorLookup</h2>
<br>
<pre>public interface <span class="typeNameLabel">ColorLookup</span></pre>
<div class="block">Allows looking up an RGBA8888 int color given a String key, returning either the color or 256 if none was found.
This is an extension point for games and libraries that may want their own way of looking up colors.
This is an extension point for games and libraries that may want their own way of looking up colors. This can be
treated as a functional interface in Java 8 and higher.
<br>
You can see how this is used in <a href="https://github.com/yellowstonegames/SquidSquad">SquidSquad</a>, which uses
it in its squidglyph module to look up colors by potentially complex descriptive terms.</div>
Expand Down
Loading

0 comments on commit 95d0484

Please sign in to comment.