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.
43 lines • 1.48 kB
TypeScript
import { AViewerPluginEventMap, AViewerPluginSync, ThreeViewer } from '../../viewer';
export interface FileTransferPluginEventMap extends AViewerPluginEventMap {
transferFile: {
path: string;
state: 'exporting' | 'done' | 'error';
progress?: number;
name?: string;
};
}
/**
* File Transfer Plugin
*
* Provides a way to extend the viewer.export functionality with custom actions. Used in `AWSClientPlugin` to upload files directly to S3.
*
* @category Plugins
*/
export declare class FileTransferPlugin extends AViewerPluginSync<FileTransferPluginEventMap> {
enabled: boolean;
static readonly PluginType = "FileTransferPlugin";
toJSON: any;
exportFile(file: File | Blob, name?: string): Promise<void>;
readonly defaultActions: {
exportFile: (blob: Blob, name: string, _onProgress?: (d: {
state?: "exporting" | "done" | "error";
progress?: number;
}) => void) => Promise<void>;
};
constructor();
onAdded(viewer: ThreeViewer): void;
onRemove(viewer: ThreeViewer): void;
protected _updateProcessState(data: {
path: string;
state: string;
progress?: number;
}): void;
actions: {
exportFile: (blob: Blob, name: string, _onProgress?: (d: {
state?: "exporting" | "done" | "error";
progress?: number;
}) => void) => Promise<void>;
};
}
//# sourceMappingURL=FileTransferPlugin.d.ts.map