Skip to content

Instantly share code, notes, and snippets.

@photonstorm
Last active April 15, 2018 13:00
Show Gist options
  • Select an option

  • Save photonstorm/5eaab1e1ad1728483d2549be3454289f to your computer and use it in GitHub Desktop.

Select an option

Save photonstorm/5eaab1e1ad1728483d2549be3454289f to your computer and use it in GitHub Desktop.
Phaser Compressed Texture Support
// Phaser 3 has the new Loader method, texture:
load.texture('factory', {
etc1: 'assets/factory_etc1.pkm',
s3tc: 'assets/factory_dxt1.pvr',
pvrtc: 'assets/factory_pvrtc.pvr',
truecolor: 'assets/factory.png'
});
// You can also use load.image:
load.image('factory', {
etc1: 'assets/factory_etc1.pkm',
s3tc: 'assets/factory_dxt1.pvr',
pvrtc: 'assets/factory_pvrtc.pvr',
truecolor: 'assets/factory.png'
});
// And if you pass an object like the above to it, it'll proxy onto load.texture for you.
@Leonte09
Copy link
Copy Markdown

3053

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment