UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

39 lines (38 loc) 1.12 kB
import { BaseNodeType } from '../nodes/_Base'; import { PolyEngine } from '../Poly'; import { CoreGraphNodeId } from '../../core/graph/CoreGraph'; export interface BlobUrlData { blobUrl: string; } export interface BlobsControllerFetchNodeOptions { multiAssetsForNode?: boolean; } export interface FetchNodeBlobUrlOptions extends BlobsControllerFetchNodeOptions { fullUrl: string; node: BaseNodeType; } export interface FetchBlobResponse { blobWrapper?: BlobWrapper; error?: string; } interface BlobWrapper { blob: Blob; blobUrl: string; referringNodeIds: Set<CoreGraphNodeId>; } interface BlobData { url: string; blobWrapper: BlobWrapper; } type BlobDataCallback = (params: BlobData) => void; export declare class BlobsController { private poly; constructor(poly: PolyEngine); recording(): boolean; clear(): void; clearBlobsForNode(node: BaseNodeType): void; setVirtualFile(file: File, uniqueId: string): Promise<void>; fetchBlobGlobal(url: string): Promise<FetchBlobResponse | void>; traverse(callback: BlobDataCallback): void; } export {};