wwobjloader2
Version:
[](https://github.com/kaisalmen/WWOBJLoader/blob/dev/LICENSE) [](https://github.com/kaisalm
38 lines • 1.11 kB
TypeScript
/**
* Encapsulates a url and derived values (filename, extension and path and stores the {@link ArrayBuffer}
* loaded from the resource described by the url.
*/
declare class ResourceDescriptor {
private url;
private path;
private filename;
private extension;
private buffer;
private needStringOutput;
constructor(url: string);
getUrl(): URL;
/**
* Returns ths path from the base of the URL to the file
* @return {string}
*/
getPath(): string;
getFilename(): string;
getExtension(): string | undefined;
setNeedStringOutput(needStringOutput: boolean): this;
isNeedStringOutput(): boolean;
/**
* Set the buffer after loading.
* @param {ArrayBufferLike} buffer
* @return {ResourceDescriptor}
*/
setBuffer(buffer: ArrayBufferLike): this;
getBuffer(): ArrayBufferLike | undefined;
/**
* Returns the buffer as string by using {@link TextDecoder}.
*
* @return {string}
*/
getBufferAsString(): string;
}
export { ResourceDescriptor };
//# sourceMappingURL=ResourceDescriptor.d.ts.map