SupportedImageFormats.js 632 B

12345678910111213141516
  1. import defaultValue from "../Core/defaultValue.js";
  2. /**
  3. * Image formats supported by the browser.
  4. *
  5. * @param {Object} [options] Object with the following properties:
  6. * @param {Boolean} [options.webp=false] Whether the browser supports WebP images.
  7. * @param {Boolean} [options.basis=false] Whether the browser supports compressed textures required to view KTX2 + Basis Universal images.
  8. *
  9. * @private
  10. */
  11. export default function SupportedImageFormats(options) {
  12. options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  13. this.webp = defaultValue(options.webp, false);
  14. this.basis = defaultValue(options.basis, false);
  15. }