/** * This is a wrapper to treat the arraybuffer as a file */ export interface IArrayBufferFile { /** * Relative path of the texture e.g. "tex/texture.png" * * Used as a key to load the texture not as a path */ readonly relativePath: string; /** * MIME type of the texture * * e.g. "image/png" */ readonly mimeType: string | undefined; /** * Texture data encoded in PNG/JPG/BMP */ readonly data: ArrayBuffer; } /** * Reference file resolver * * This class is used to resolve the file from the path * * It's responsibility is similar to a file system */ export declare class ReferenceFileResolver { /** * File list that can be resolved */ readonly files: readonly T[]; private readonly _rootUrl; private readonly _fileRootId; private readonly _fileMap; /** * Create a reference file resolver * * File root id can be root url, and becomes id for formats where texture is included in binary files, such as BPMX * @param files File list * @param rootUrl Root url for trim the path of the files * @param fileRootId File root id for give the unique id for the files */ constructor(files: readonly T[], rootUrl: string, fileRootId: string); /** * Create full path from relative path for resolve the file * @param relativePath Relative path * @returns Full path */ createFullPath(relativePath: string): string; /** * Resolve the file from the path * @param path Path * @returns File */ resolve(path: string): T | undefined; }