Open vforsh opened 6 years ago
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.
Please add the check for
webp
image format. It becomes more and more popular. Something likegame.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