0.2.8 • Published 3 years ago

grunt-free-tex-packer v0.2.8

Weekly downloads
3
License
-
Repository
github
Last release
3 years ago

grunt-free-tex-packer

Stats \ Free texture packer plugin for grunt \ Based on https://github.com/odrick/free-tex-packer

Install

$ npm install grunt-free-tex-packer

Basic usage

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']);
};

Advanced usage

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']);
};

Additional parameters:

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

Used libs


License: MIT

0.2.7

3 years ago

0.2.8

3 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago