UNPKG

@deck.gl/core

Version:

deck.gl core library

40 lines 1.14 kB
import { Device } from '@luma.gl/core'; export type ResourceManagerContext = { device: Device; resourceManager: ResourceManager; /** @deprecated */ gl: WebGL2RenderingContext; }; export default class ResourceManager { protocol: string; private _context; private _resources; private _consumers; private _pruneRequest; constructor(props: { device: Device; protocol?: string; }); contains(resourceId: string): boolean; add({ resourceId, data, forceUpdate, persistent }: { resourceId: string; data: any; forceUpdate?: boolean; persistent?: boolean; }): void; remove(resourceId: string): void; unsubscribe({ consumerId }: { consumerId: string; }): void; subscribe<T>({ resourceId, onChange, consumerId, requestId }: { resourceId: string; onChange: (data: T | Promise<T>) => void; consumerId: string; requestId: string; }): T | Promise<T> | undefined; prune(): void; finalize(): void; private _track; private _prune; } //# sourceMappingURL=resource-manager.d.ts.map