phaser-ce icon indicating copy to clipboard operation
phaser-ce copied to clipboard

Add check if webp images are supported

Open vforsh opened this issue 7 years ago • 4 comments

Please add the check for webp image format. It becomes more and more popular. Something like game.device.webp will be great.

For example, this is how Modernizr performs such check - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/img/webp.js

vforsh avatar Jan 15 '18 13:01 vforsh

There would be a small time cost to loading the image.

The implementation would also be a little challenging because none of Phaser.Device's tests are asynchronous, like this one.

samme avatar Jan 15 '18 18:01 samme

Does Phaser-ce support webp or other latest image formats?

ankush-badyal avatar Apr 18 '18 12:04 ankush-badyal

That would depend on the browser's support for WebP.

samme avatar Apr 18 '18 14:04 samme

I think it would make sense to have an automatism in the atlas loader, which would either load the webp or other format.

oktayacikalin avatar May 19 '18 08:05 oktayacikalin