threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
40 lines (33 loc) • 1.11 kB
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
filePath?: string // from Dropzone, the path of the file in the zip or folder
// 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[],
/**
* @internal
*/
preImportedRaw?: Promise<ImportResult | ImportResult[] | undefined> // todo type
/**
* @internal
*/
preImported?: ImportResult[] // todo type
/**
* @internal - serialized options for internal caching
*/
_options?: string
[id: string]: any
}
export interface IAssetList {
basePath?: string;
assets: IAsset[];
}