async function loadResources(loader) {
  const resourceCache = loader._resourceCache;
  try {
    const imageLoader = resourceCache.getImageLoader({
      gltf: loader._gltf,
      imageId: loader._imageId,
      gltfResource: loader._gltfResource,
      baseResource: loader._baseResource,
    });
    loader._imageLoader = imageLoader;
    await imageLoader.load();

    if (loader.isDestroyed()) {
      return;
    }

    // Now wait for process() to run to finish loading
    loader._image = imageLoader.image;
    loader._mipLevels = imageLoader.mipLevels;
    loader._state = ResourceLoaderState.LOADED;

    return loader;
  } catch (error) {
    if (loader.isDestroyed()) {
      return;
    }

    loader.unload();
    loader._state = ResourceLoaderState.FAILED;
    const errorMessage = "Failed to load texture";
    throw loader.getError(errorMessage, error);
  }
}
The texture.

@memberof GltfTextureLoader.prototype

@type {Texture}
@readonly
@private