/**
 * Base interface for any kind loaders
 * @public
 */ class LoaderBase {
    /** @internal */ _urlResolver;
    /**
   * Creates an instance of LoaderBase
   */ constructor(){
        this._urlResolver = null;
    }
    /**
   * URL resolver for the loader
   */ get urlResolver() {
        return this._urlResolver;
    }
    set urlResolver(resolver) {
        this._urlResolver = resolver;
    }
    /**
   * Sends a GET request
   * @param url - The URL to get
   * @param headers - The headers for the request
   * @param crossOrigin - crossOrigin property for the request
   * @returns Response of the request
   */ async request(url, headers = {}, crossOrigin = 'anonymous') {
        const s = this._urlResolver ? this._urlResolver(url) : null;
        return s ? fetch(s, {
            credentials: crossOrigin === 'anonymous' ? 'same-origin' : 'include',
            headers: headers
        }) : null;
    }
}
/**
 * Base class for any kind of texture loaders
 * @public
 */ class AbstractTextureLoader extends LoaderBase {
}
/**
 * Base class for any kind of model loaders
 * @public
 */ class AbstractModelLoader extends LoaderBase {
}

export { AbstractModelLoader, AbstractTextureLoader, LoaderBase };
//# sourceMappingURL=loader.js.map
