Resibu Logo

Libgdx Texturepacker |work| -

Here's how to generate content (atlas and image files) using libGDX TexturePacker:

java -cp "gdx.jar:gdx-tools.jar" com.badlogic.gdx.tools.texturepacker.TexturePacker \ input_dir \ output_dir \ atlas_name \ [setting1=value1 setting2=value2 ...] libgdx texturepacker

Or with the main class:

Integrating TexturePacker with LibGDX is seamless. Once you've generated your texture atlas, you can easily load it into your LibGDX project using the TextureAtlas class. Here's how to generate content (atlas and image

TextureAtlas atlas = new TextureAtlas(Gdx.files.internal("output/my-atlas.atlas")); TextureRegion region = atlas.findRegion("character/idle"); Sprite sprite = atlas.createSprite("ui/button"); TextureRegion region = atlas.findRegion("character/idle")