import { IDisposable } from "../misc/IDisposable"; export interface IResourceConfig { } /** * Base class of all resource objects that are loaded by ResourceManagers. * Resource is a generic class that returns an internally loaded object/asset. * Classed that derive from Resource should specifify what the object being loaded is. */ export declare abstract class Resource implements IDisposable { private _name; private _loaded; private _loadPromise; private _object; protected _progress: number; get name(): string; get loaded(): boolean; get progress(): number; get object(): O; constructor(name: string, config: K); load(): Promise>; unload(): void; dispose(): void; /** * This function should be implemented by classed that derive from Resource * to return a promise that for the Resource's given object type. */ protected abstract _loadObject(): Promise; /** * This function should be implemented by classed that derive from Resource * to unload and release memory for the Resource's loaded object. */ protected abstract _unloadObject(): void; }