Skip to content

texture-packer: Handle different exporters #53

@sylvainpolletvillard

Description

@sylvainpolletvillard

So assetpack is great and I'm very thankful to the Pixi team for working on this.

Currently, the texture-packer plugin use Pixi exporter:

function pixiTexturePacker(options) {
    return texturePacker({
        ...options,
        texturePacker: {
            ...options?.texturePacker,
            exporter: 'Pixi',
        },
    });
}

which makes sense since Pixi made assetpack.
But unfortunately, I use Phaser 3 for my project and Phaser and Pixi use a different format for JSON texture atlas.

The texturepacker plugin code has some code that expects the Pixi exporter and cause exceptions when using another exporter, despite free-tex-packer-core allowing several exporters to be used.

So my question is: would you consider making this tool work for other exporters format than Pixi's one ? Or is it out of the scope of this project ?

If yes, I'll do my best to provide a PR that enables support for Phaser 3 exporter. If not, I'll fork this project and won't annoy you anymore. Thanks for reading ☺

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions