Compressed Texture Atlas via File Config

Load a texture atlas by providing multiple compressed texture formats (ASTC, ETC, PVRTC, S3TC) and a PNG fallback within a single configuration object.

Compressed Texture Atlas via File Config, running
800 × 600
GitHub
class Demo extends Phaser.Scene
{
    constructor ()
    {
        super();
    }

    preload ()
    {
        this.load.setBaseURL('https://cdn.phaserfiles.com/v410');
        const path = 'assets/compressed';

        this.load.texture(
            {
                "key": "labs",
                "url": {
                    'ASTC': { type: 'PVR', textureURL: `${path}/compressed/textures-ASTC-4x4-lRGB.pvr`, atlasURL: `${path}/uncompressed/textures.json` },
                    'ETC': { type: 'PVR', textureURL: `${path}/compressed/textures-ETC2-lRGB.pvr`, atlasURL: `${path}/uncompressed/textures.json` },
                    'PVRTC': { type: 'PVR', textureURL: `${path}/compressed/textures-PVRTC-4BPP-lRGB.pvr`, atlasURL: `${path}/uncompressed/textures.json` },
                    'S3TC': { type: 'PVR', textureURL: `${path}/compressed/textures-S3TC-BC3-lRGB.pvr`, atlasURL: `${path}/uncompressed/textures.json` },
                    'IMG': { textureURL: `${path}/textures.png`, atlasURL: `${path}/uncompressed/textures.json` }
                }
            }
        );
    }

    create ()
    {
        const bubble = this.add.sprite(0, 40, 'labs', 'bubble256').setOrigin(0);
        const logo = this.add.sprite(80, 100, 'labs', 'logo').setOrigin(0);

        this.add.text(400, 570, logo.frame.source.compressionAlgorithm).setOrigin(0.5, 0);
    }
}

const config = {
    scale: { mode: Phaser.Scale.FIT },
    type: Phaser.AUTO,
    parent: 'game-container',
    width: 800,
    height: 600,
    backgroundColor: '#2d2d6d',
    scene: Demo
};

const game = new Phaser.Game(config);

More in Textures36 examples