text: import { GLTFLoader, ArrayItem } from "../glTFLoader";
  var NAME = "EXT_texture_webp";
  /**
   * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)
   */
  var EXT_texture_webp = /** @class */ (function () {
      /** @hidden */
      function EXT_texture_webp(loader) {
          /** The name of this extension. */
          this.name = NAME;
          this._loader = loader;
          this.enabled = loader.isExtensionUsed(NAME);
      }
      /** @hidden */
      EXT_texture_webp.prototype.dispose = function () {
          this._loader = null;
      };
      /** @hidden */
      EXT_texture_webp.prototype._loadTextureAsync = function (context, texture, assign) {
          var _this = this;
          return GLTFLoader.LoadExtensionAsync(context, texture, this.name, function (extensionContext, extension) {
              var sampler = (texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(context + "/sampler", _this._loader.gltf.samplers, texture.sampler));
              var image = ArrayItem.Get(extensionContext + "/source", _this._loader.gltf.images, extension.source);
              return _this._loader._createTextureAsync(context, sampler, image, function (babylonTexture) {
                  assign(babylonTexture);
              });
          });
      };
      return EXT_texture_webp;
  }());
  export { EXT_texture_webp };
  GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_texture_webp(loader); });
  //# sourceMappingURL=EXT_texture_webp.js.map