本文整理汇总了Java中com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings类的典型用法代码示例。如果您正苦于以下问题:Java Settings类的具体用法?Java Settings怎么用?Java Settings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Settings类属于com.badlogic.gdx.tools.texturepacker.TexturePacker包,在下文中一共展示了Settings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main(String[] args) {
Settings settings = new Settings();
settings.maxWidth = 2048;
settings.maxHeight = 2048;
// We will assume that this code runs from
// [art]
// Raw assets live in
// [art]/assets/[sheetname]
// Thus, all asset source paths should be prefixed with
// assets
// and all asset destination paths should be prefixed with
// package
TexturePacker.process(settings, "assets/images", "package/assets", "main");
TexturePacker.process(settings, "assets/characters", "package/assets", "characters");
TexturePacker.process(settings, "assets/titleScreen", "package/assets", "titlescreen");
TexturePacker.process(settings, "assets/menuControls", "package/assets", "menu");
TexturePacker.process(settings, "assets/creditslogos", "package/assets", "credits");
}
开发者ID:ChainGangChase,项目名称:cgc-art,代码行数:21,代码来源:Textures.java
示例2: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main (String[] arg) throws IOException {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.width = 1280;
config.height = 720;
// Packer settings
Settings settings = new Settings();
settings.maxWidth = 2048;
settings.maxHeight = 2048;
settings.edgePadding = true;
settings.paddingX = 0;
settings.paddingY = 0;
// Pack textures
//RuntimeTexturePacker.generateAtlases(settings);
new LwjglApplication(new LibgdxJam(), config);
}
开发者ID:saltares,项目名称:libgdxjam,代码行数:20,代码来源:DesktopLauncher.java
示例3: processFolder
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
private static final void processFolder(Settings settings, String path)
{
File folderToProcess = new File(path);
boolean folderRequiresProcess = false;
for(File childFile : folderToProcess.listFiles())
{
if(childFile.isDirectory())
{
processFolder(settings, childFile.getAbsolutePath());
}
else
{
// It is a file, we need to pack!!
folderRequiresProcess = true;
}
}
// Perform actual pack now that we know that it's required
if(folderRequiresProcess)
{
TexturePacker.process(settings, path, path, folderToProcess.getName());
}
}
开发者ID:saltares,项目名称:libgdxjam,代码行数:26,代码来源:RuntimeTexturePacker.java
示例4: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main(String[] arg) {
if (Assets.rebuildAtlas) {
Settings settings = new Settings();
settings.maxWidth = 2048;
settings.maxHeight = 2048;
settings.debug = Assets.drawDebugOutline;
try {
TexturePacker.process(settings, "assets-raw",
"../android/assets", "assets");
} catch (Exception e) {
e.printStackTrace();
}
}
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.width = 1280;
config.height = 720;
config.addIcon("icon128.png", FileType.Internal);
config.addIcon("icon32.png", FileType.Internal);
config.addIcon("icon16.png", FileType.Internal);
new LwjglApplication(new Main(), config);
}
开发者ID:libgdx-jam,项目名称:GDXJam,代码行数:26,代码来源:DesktopLauncher.java
示例5: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main(String[] arg) throws FileNotFoundException, IOException {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = GameConstants.WINDOW_TITLE;
config.addIcon("gameicon.png", FileType.Internal);
config.width = GameConstants.GAME_WIDTH;
config.height = GameConstants.GAME_HEIGHT;
config.fullscreen = false;
readConfigFromPreference(config);
config.vSyncEnabled = config.fullscreen;
// check debug/run configuration ENVIRONMENT tab
// if the "DEVEOPMENT" flag is true, then the graphics will be packed together
// set the flag to false before exporting the jar
String getenv = System.getenv("DEVELOPMENT");
if (getenv != null && "true".equals(getenv)) {
Settings settings = new Settings();
settings.combineSubdirectories = true;
TexturePacker.process(settings, "../core/assets/graphics/hud", "../core/assets/packedGraphics", "hud");
TexturePacker.process(settings, "../core/assets/graphics/game", "../core/assets/packedGraphics", "gameGraphics");
TexturePacker.process(settings, "../core/assets/graphics/menu", "../core/assets/packedGraphics", "menuGraphics");
}
new LwjglApplication(new GDXGame(), config);
}
开发者ID:Quillraven,项目名称:Protoman-vs-Megaman,代码行数:25,代码来源:DesktopLauncher.java
示例6: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main(String args[]){
if(resolver == null){
resolver = new Main();
}
boolean hacer_packer = false;
if(hacer_packer){
Settings settings = new Settings();
settings.pot = false;
settings.maxHeight = 1024;
settings.maxWidth = 1024;
settings.paddingX = 1;
settings.paddingY = 1;
settings.filterMin = TextureFilter.Linear;
settings.filterMag = TextureFilter.Linear;
TexturePacker.process(settings, "dataPC/screens/play/", "data/screens/play/", "play");
TexturePacker.process(settings, "dataPC/screens/background/", "data/screens/background", "bg");
}
new LwjglApplication(new Bar(resolver), "Bar", 480, 854, true);
}
开发者ID:randombot,项目名称:bar,代码行数:27,代码来源:Main.java
示例7: packImages
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void packImages() {
File dir = new File(root);
String inputDir = "";
String outputDir = "";
String outputFile = "";
String[] content = dir.list();
Settings settings = new Settings();
settings.maxWidth = 2048;
settings.maxHeight = 2048;
settings.pot = false;
for (int i = 0; i < content.length; i++) {
if (new File(root + filesep + content[i]).isDirectory()) {
inputDir = root + filesep + content[i];
outputDir = root + filesep + content[i];
outputFile = content[i] + ".atlas";
TexturePacker.processIfModified(settings, inputDir, outputDir, outputFile);
}
}
}
开发者ID:PhilippGrulich,项目名称:HAW-SE2-projecthorse,代码行数:22,代码来源:Packer.java
示例8: createAtlas
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
private void createAtlas(FileHandle directory, String atlasName) {
Settings settings = new Settings();
settings.minWidth = 32;
settings.minHeight = 32;
settings.maxWidth = 2048;
settings.maxHeight = 2048;
settings.pot = true;
settings.paddingX = 0;
settings.paddingY = 0;
String inputDirectory = directory.path();
String outputDirectory = directory.path();
String packFileName = atlasName;
TexturePacker.process(settings, inputDirectory, outputDirectory, packFileName);
}
开发者ID:antag99,项目名称:aquarria,代码行数:17,代码来源:ContentExtractor.java
示例9: pack
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void pack(String input_asset_folder,String output_asset_folder,String output_file_name) {
Settings settings = new Settings();
settings.useIndexes = use_index;
settings.pot = true;
settings.maxWidth = size;
settings.maxHeight = size;
settings.alias = false;
// settings.stripWhitespaceX = strip_whitespace;//
// settings.stripWhitespaceY = strip_whitespace;
settings.atlasExtension = extension;
TexturePacker.process(settings, input_folder+"/"+input_asset_folder,output_folder+output_asset_folder, output_file_name);
}
开发者ID:kyperbelt,项目名称:KyperBox,代码行数:15,代码来源:AutoPacking.java
示例10: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main(String[] arg) {
Settings settings = new Settings();
settings.combineSubdirectories = true;
settings.maxWidth = settings.maxHeight = 2048;
// com.badlogic.gdx.tools.texturepacker.TexturePacker.process(settings, "tmp/ui/skins", "packed/ui/skins/", "uiskin");
// com.badlogic.gdx.tools.texturepacker.TexturePacker.process(settings, "tmp/ui/icons", "../core/assets/skins/icons", "icons");
// com.badlogic.gdx.tools.texturepacker.TexturePacker.process(settings, "tmp/characters", "packed/characters", "characters");
com.badlogic.gdx.tools.texturepacker.TexturePacker.process(settings, "tmp/items", "packed/items", "items");
}
开发者ID:Quillraven,项目名称:Quilly-s-Castle,代码行数:11,代码来源:TexturePacker.java
示例11: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main (String[] arg) {
final boolean needToPackTexture=false;
if(needToPackTexture)
{
// for high resolution (1280x720)
Settings settings=new Settings();
settings.maxHeight=2048;
settings.maxWidth=2048;
settings.filterMin=TextureFilter.MipMapLinearLinear;
settings.filterMag=TextureFilter.Linear;
settings.fast=true;
settings.duplicatePadding=true;
settings.scale=new float[]{1,0.5f};
settings.scaleSuffix=new String[]{"e","e_small"};
TexturePacker.process(settings, "../../images", ".", "gam");
// for lower resolution
settings.maxHeight=1024;
settings.maxWidth=1024;
//TexturePacker.process(settings, "../../images_small", ".", "game_small");
}
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.width=482;
config.height=320;
//config.width=320;
//config.height=480;
config.useGL30 = false;
ShapeClearGame game=new ShapeClearGame();
game.platformSpecific=new DesktopSpecific();
new LwjglApplication(game, config);
}
开发者ID:stdio2016,项目名称:ShapeClear,代码行数:34,代码来源:DesktopLauncher.java
示例12: texturePack
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
@Override
public void texturePack(Array<FileHandle> handles, FileHandle localFile, FileHandle targetFile) {
//copy defaults.json to temp folder if it doesn't exist
FileHandle fileHandle = Gdx.files.local("texturepacker/defaults.json");
if (!fileHandle.exists()) {
Gdx.files.internal("defaults.json").copyTo(fileHandle);
}
Json json = new Json();
Settings settings = json.fromJson(Settings.class, fileHandle);
TexturePacker p = new TexturePacker(settings);
for (FileHandle handle : handles) {
if (handle.exists()) {
p.addImage(handle.file());
} else {
if (localFile != null) {
FileHandle localHandle = localFile.sibling(localFile.nameWithoutExtension() + "_data/" + handle.name());
if (localHandle.exists()) {
p.addImage(localHandle.file());
} else {
Gdx.app.error(getClass().getName(), "File does not exist error while creating texture atlas: " + handle.path());
}
} else {
Gdx.app.error(getClass().getName(), "File does not exist error while creating texture atlas: " + handle.path());
}
}
}
p.pack(targetFile.parent().file(), targetFile.nameWithoutExtension());
}
开发者ID:raeleus,项目名称:skin-composer,代码行数:31,代码来源:DesktopLauncher.java
示例13: TexturePackerFileProcessor
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public TexturePackerFileProcessor (Settings defaultSettings, String packFileName) {
this.defaultSettings = defaultSettings;
if (packFileName.toLowerCase().endsWith(defaultSettings.atlasExtension.toLowerCase()))
packFileName = packFileName.substring(0, packFileName.length() - defaultSettings.atlasExtension.length());
this.packFileName = packFileName;
setFlattenOutput(true);
addInputSuffix(".png", ".jpg", ".jpeg");
}
开发者ID:raeleus,项目名称:skin-composer,代码行数:11,代码来源:TexturePackerFileProcessor.java
示例14: merge
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
private void merge (Settings settings, File settingsFile) {
try {
json.readFields(settings, new JsonReader().parse(new FileReader(settingsFile)));
} catch (Exception ex) {
throw new GdxRuntimeException("Error reading settings file: " + settingsFile, ex);
}
}
开发者ID:raeleus,项目名称:skin-composer,代码行数:8,代码来源:TexturePackerFileProcessor.java
示例15: ImageProcessor
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
/** @param rootDir Used to strip the root directory prefix from image file names, can be null. */
public ImageProcessor (File rootDir, Settings settings) {
this.settings = settings;
if (rootDir != null) {
rootPath = rootDir.getAbsolutePath().replace('\\', '/');
if (!rootPath.endsWith("/")) rootPath += "/";
}
}
开发者ID:raeleus,项目名称:skin-composer,代码行数:10,代码来源:ImageProcessor.java
示例16: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main (String[] arg) {
boolean shouldPack = arg.length == 1 && "pack".equals(arg[0]);
boolean shouldCompile = arg.length == 2 && "compile".equals(arg[0]);
if (shouldCompile) {
String folderName = arg[1];
ScriptCompiler compiler = new ScriptCompiler(folderName);
compiler.run();
return;
}
if (shouldPack) {
Settings settings = new Settings();
settings.maxHeight = 2048;
settings.maxWidth = 4096;
TexturePacker.process("bin/images", "bin", "uiStyle");
TexturePacker.process(settings, "bin/modules/showcase/ui/images/startGameMenu", "bin/modules/showcase/ui/", "startGameMenuStyle");
TexturePacker.process(settings, "bin/modules/showcase/ui/images/partyCreation", "bin/modules/showcase/ui/", "partyCreationStyle");
TexturePacker.process("bin/modules/showcase/ui/images/game", "bin/modules/showcase/ui/", "uiStyle");
TexturePacker.process("bin/modules/showcase/perks/images/small", "bin/modules/showcase/perks/images/", "perkImages");
TexturePacker.process("bin/modules/showcase/spells/images/small", "bin/modules/showcase/spells/images/", "spellImages");
}
Configuration.createConfiguration(new LwjglFiles());
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "Fabulae";
cfg.width = Configuration.getScreenWidth();
cfg.height = Configuration.getScreenHeight();
cfg.fullscreen = Configuration.isFullscreen();
new LwjglApplication(new FishchickenGame(), cfg).setLogLevel(Application.LOG_DEBUG);
}
开发者ID:mganzarcik,项目名称:fabulae,代码行数:35,代码来源:DesktopLauncher.java
示例17: ImageProcessor
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
/** @param rootDir Used to strip the root directory prefix from image file names, can be null. */
public ImageProcessor(File rootDir, Settings settings) {
this.settings = settings;
if (rootDir != null) {
rootPath = rootDir.getAbsolutePath().replace('\\', '/');
if (!rootPath.endsWith("/")) rootPath += "/";
}
}
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:10,代码来源:ImageProcessor.java
示例18: generateAtlases
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static final void generateAtlases(Settings settings)
{
// Clean atlas files if already exist
System.out.println("--- Cleaning textures folders...");
cleanFolder(Env.TEXTURES_FOLDER);
// Process folders
System.out.println("--- Packaging textures...");
processFolder(settings, Env.UI_FOLDER);
processFolder(settings, Env.TEXTURES_FOLDER);
System.out.println("--- Packaging done");
}
开发者ID:saltares,项目名称:libgdxjam,代码行数:13,代码来源:RuntimeTexturePacker.java
示例19: main
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
Settings settings = new Settings();
settings.maxWidth = 1024;
settings.maxHeight = 1024;
TexturePacker.process(settings, "../images", "../android/assets/data/skins/", "menu");
TexturePacker.process("../../images/", "/textures/", "default");
}
开发者ID:AlexAUT,项目名称:Kroniax,代码行数:8,代码来源:MyPacker.java
示例20: TexturePackerFileProcessor
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings; //导入依赖的package包/类
public TexturePackerFileProcessor (Settings defaultSettings, String packFileName) {
this.defaultSettings = defaultSettings;
if (packFileName.toLowerCase().endsWith(defaultSettings.atlasExtension.toLowerCase()))
packFileName = packFileName.substring(0, packFileName.length() - defaultSettings.atlasExtension.length());
this.packFileName = packFileName;
setFlattenOutput(true);
addInputSuffix(".png", ".jpg");
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:11,代码来源:TexturePackerFileProcessor.java
注:本文中的com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论