Free texture packer plugin for grunt
Based on https://github.com/odrick/free-tex-packer
$ npm install grunt-free-tex-packer
module.exports = function(grunt) {
grunt.initConfig({
free_tex_packer: {
demo: {
files: [
{expand: true, src: 'src/**/*', basePath: 'src/', filter: 'isFile'}
],
options: {
dest: 'dest'
}
}
}
});
grunt.loadNpmTasks('grunt-free-tex-packer');
grunt.registerTask('default', ['free_tex_packer']);
};
Use packer options object
module.exports = function(grunt) {
grunt.initConfig({
free_tex_packer: {
demo: {
files: [
{expand: true, src: 'src/**/*', basePath: 'src/', filter: 'isFile'}
],
options: {
dest: 'dest',
textureName: "my-texture",
width: 1024,
height: 1024,
fixedSize: false,
padding: 2,
allowRotation: true,
detectIdentical: true,
allowTrim: true,
exporter: "Pixi",
removeFileExtension: true,
prependFolderName: true
}
}
}
});
grunt.loadNpmTasks('grunt-free-tex-packer');
grunt.registerTask('default', ['free_tex_packer']);
};
basePath in files - path to be removed from sprite name in texture dest in options - destination folder path
Pack options description: https://github.com/odrick/free-tex-packer-core#available-options
Custom exporters description: https://github.com/odrick/free-tex-packer-core#custom-exporter
- Free texture packer core - https://github.com/odrick/free-tex-packer-core
License: MIT