async function loadExternalBuffer(bufferLoader) {
  const resource = bufferLoader._resource;
  bufferLoader._state = ResourceLoaderState.LOADING;
  try {
    const arrayBuffer = await BufferLoader._fetchArrayBuffer(resource);
    if (bufferLoader.isDestroyed()) {
      return;
    }

    bufferLoader._typedArray = new Uint8Array(arrayBuffer);
    bufferLoader._state = ResourceLoaderState.READY;
    return bufferLoader;
  } catch (error) {
    if (bufferLoader.isDestroyed()) {
      return;
    }

    bufferLoader._state = ResourceLoaderState.FAILED;
    const errorMessage = `Failed to load external buffer: ${resource.url}`;
    throw bufferLoader.getError(errorMessage, error);
  }
}
Loads the resource.
@returns {Promise<BufferLoader>} A promise which resolves to the loader when the resource loading is completed.
@private