threepipe
Version:
A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.
28 lines (22 loc) • 861 B
text/typescript
import {ImportResult} from './IAssetImporter'
export type IAssetID = string
export type IFile = Blob & Partial<File> & {
objectUrl?: string, // URL created from URL.createObjectURL, used to revoke the objectUrl with URL.revokeObjectURL
ext?: string // extension of the file without the dot
mime?: string // mime type of the file
// eslint-disable-next-line @typescript-eslint/naming-convention
__loadedAsset?: ImportResult | ImportResult[] // used by asset manager to store the loaded asset
}
export interface IAsset {
id?: IAssetID;
path: string;
file?: IFile,
// variants?: IAssetID[],
preImportedRaw?: Promise<ImportResult | ImportResult[] | undefined> // todo type
preImported?: ImportResult[] // todo type
[id: string]: any
}
export interface IAssetList {
basePath?: string;
assets: IAsset[];
}