Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 517 Bytes

compressed_textures.md

File metadata and controls

14 lines (11 loc) · 517 Bytes

How to use compressed textures

This example is for PixiJS version < 7.x

PIXI.loader.before(PIXI.compressedTextures.extensionChooser(["@2x.atlas", ".dds"]));
var options = { metadata: { spineMetadata: { choice: ["@.5x.atlas", "@2x.atlas"] }, imageMetadata: { choice: [".dds", ".pvr"] } } };

PIXI.loader
    .add('spineCharacter', 'spine-data-1/HERO.json', options)
    .load(function (loader, resources) {
        var animation = new PIXI.spine.Spine(resources.spineCharacter.spineData);
    });