phaser-ce
phaser-ce copied to clipboard
Add check if webp images are supported
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
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.
Does Phaser-ce support webp or other latest image formats?
That would depend on the browser's support for WebP.
I think it would make sense to have an automatism in the atlas loader, which would either load the webp or other format.