Libgdx Texture Packer New! -

import com.badlogic.gdx.tools.texturepacker.TexturePacker; public class AssetPacker public static void main(String[] args) TexturePacker.Settings settings = new TexturePacker.Settings(); settings.pot = true; settings.paddingX = 2; settings.paddingY = 2; settings.edgePadding = true; settings.stripWhitespace = true; settings.filterMin = TexturePacker.Settings.TextureFilter.Nearest; settings.filterMag = TexturePacker.Settings.TextureFilter.Nearest;

// 1. Load the atlas TextureAtlas atlas = new TextureAtlas(Gdx.files.internal("player.atlas")); // 2. Get a single region (a sprite from the atlas) TextureRegion playerStand = atlas.findRegion("player_idle_01"); libgdx texture packer

Add the dependency to your core/build.gradle : import com

Run this main method every time you change your assets. Once you have player.atlas and player.png in your assets folder, load and use them: settings.pot = true

// 4. Or create a full Sprite (with color, rotation, etc.) Sprite playerSprite = atlas.createSprite("player_jump");

dependencies // ... your other dependencies compileOnly "com.badlogicgames.gdx:gdx-tools:$gdxVersion"