UNPKG

three-game-engine

Version:

Simple light-weight game engine using three.js, three-mesh-ui and rapier

24 lines (23 loc) 852 B
import EventEmitter from "../util/EventEmitter"; declare class Asset { baseURL: string | null; dirHandle: FileSystemDirectoryHandle | null; path: string; data: any; objectURL: string | null; eventEmitter: EventEmitter; constructor(baseURLorDirHandle: string | FileSystemDirectoryHandle, path: string); /** * Obtains the full url (baseURL + path), or if using a FileSystemDirectoryHandle instead of a baseURL, * this will get an Object URL (a data url) that can be used to read the file contents. * @returns */ getFullURL(): Promise<string>; static getFileAtPath(dirHandle: FileSystemDirectoryHandle, path: string): Promise<File>; load(): Promise<void>; getData(): any; setData(data: any): void; once(eventName: any, fn: any): void; unload(): void; } export default Asset;