Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 661 Bytes

texture_and_sprite_resolution.md

File metadata and controls

18 lines (14 loc) · 661 Bytes

How to choose resolution

This example is for PixiJS version < 7.x

Use with pixi-compressed-textures.js

// choose preferred resolution and texture type
PIXI.loader.before(PIXI.compressedTextures.extensionChooser(["@2x.atlas"]));
// specify what resolutions are available for spine animations
var options = { metadata: { spineMetadata: { choice: ["@.5x.atlas", "@2x.atlas"] } } };

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