libgdx中Texturepacker打包小图片为大图片

libgdx中Texturepacker打包小图片为大图片

参考:

https://github.com/libgdx/libgdx/wiki/Texture-packer


调用:

// OS X / Linux
java -cp gdx.jar:extensions/gdx-tools/gdx-tools.jar com.badlogic.gdx.tools.texturepacker.TexturePacker inputDir [outputDir] [packFileName]

// WINDOWS
java -cp gdx.jar;extensions/gdx-tools/gdx-tools.jar com.badlogic.gdx.tools.texturepacker.TexturePacker inputDir [outputDir] [packFileName]

添加配置文件,剪除空白部分.

pack.json

{
    pot: true,
    paddingX: 2,
    paddingY: 2,
    bleed: true,
    edgePadding: true,
    duplicatePadding: false,
    rotation: false,
    minWidth: 16,
    minHeight: 16,
    maxWidth: 1024,
    maxHeight: 1024,
    square: false,
    stripWhitespaceX: false,
    stripWhitespaceY: false,
    alphaThreshold: 0,
    filterMin: Nearest,
    filterMag: Nearest,
    wrapX: ClampToEdge,
    wrapY: ClampToEdge,
    format: RGBA8888,
    alias: true,
    outputFormat: png,
    jpegQuality: 0.9,
    ignoreBlankImages: true,
    fast: false,
    debug: false,
    combineSubdirectories: false,
    flattenPaths: false,
    premultiplyAlpha: false,
    useIndexes: true,
    limitMemory: true,
    grid: false,
    scale: [ 1 ],
    scaleSuffix: [ "" ]
}


你可能感兴趣的:(libgdx中Texturepacker打包小图片为大图片)