Spine Text script
this would allow you to import text into your spine project from a file. rather than importing whole images of words / sentences this script would use individual letters and place them into spine. You would select a .txt file, then the content of that file would appear in a spine skeleton json, which you could import into your project. The advantage of this is it would pack your images much more efficiently than if you where to use images for words, and it would take the hassle out of placing letters yourself.
Problem with this is I would have to work out the kernings
Path Animation
This would take in a .png of a line and it would scan the image looking for the line, then it would create a json of a bone following that line. This one is much more complex but lots of people request path animation.
Would anybody be interested in the above scripts?
Stranica: 1/1.
BinaryCats
6.5 years ago
-
BinaryCats - Postovi: 1299
Nate
For the text script, you could use gdx-freetype in libgdx. This is a FreeType wrapper which gives you access to the font metrics and kerning. The easy way to do it is to use
You'll come to find libgdx is awesome!
BTW, I saw on IRC you were talking about build times. With Java, you can edit code while your app is running and most changes will be hot swapped into your running app. The time this saves is huge, because you don't have to restart your app and get back to the same state just to test a change.
For path animation, we hope to get it in Spine soonish.
FreeTypeFontGenerator
to generate a BitmapFont
from a TTF (or OTF) file at the size you want. Next, GlyphLayout
will tell you where all the glyphs go for a given piece of text. It uses kerning, supports line wrapping, etc. You would output Spine JSON using the information GlyphLayout
provides. It gives glyph positions, UVs, etc. You can then use BitmapFontWriter
in gdx-tools to write all the BitmapFont
glyphs to a single image file. For the best glyph packing when you know all the glyphs ahead of time, I suggest the PixmapPacker.SkylineStrategy
for the FreeTypeFontParameter
you use to generate your font, but I'd get the rest working first.You'll come to find libgdx is awesome!

For path animation, we hope to get it in Spine soonish.
6.5 years ago
-
Nate - Postovi: 11846
Pharan
libGDX is super awesome. 

Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
6.5 years ago
-
Pharan - Postovi: 5366
BinaryCats
cool, thanks for the info! who knew libgdx was that usful huhNate je napisao/la:For the text script, you could use gdx-freetype in libgdx. This is a FreeType wrapper which gives you access to the font metrics and kerning. The easy way to do it is to useFreeTypeFontGenerator
to generate aBitmapFont
from a TTF (or OTF) file at the size you want. Next,GlyphLayout
will tell you where all the glyphs go for a given piece of text. It uses kerning, supports line wrapping, etc. You would output Spine JSON using the informationGlyphLayout
provides. It gives glyph positions, UVs, etc. You can then useBitmapFontWriter
in gdx-tools to write all theBitmapFont
glyphs to a single image file. For the best glyph packing when you know all the glyphs ahead of time, I suggest thePixmapPacker.SkylineStrategy
for theFreeTypeFontParameter
you use to generate your font, but I'd get the rest working first.
You'll come to find libgdx is awesome!BTW, I saw on IRC you were talking about build times. With Java, you can edit code while your app is running and most changes will be hot swapped into your running app. The time this saves is huge, because you don't have to restart your app and get back to the same state just to test a change.
For path animation, we hope to get it in Spine soonish.

6.5 years ago
-
BinaryCats - Postovi: 1299
Mark topic unread
• Stranica: 1/1.
Natrag na Off-topic
- Vremenska zona: UTC