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.
63 lines • 2.44 kB
TypeScript
import { AViewerPluginSync } from '../../viewer';
import { CanvasSnapshotOptions } from '../../utils/canvas-snapshot';
export interface CanvasSnapshotPluginOptions extends CanvasSnapshotOptions {
/**
* If true, will wait for progressive rendering(requires {@link ProgressivePlugin}) to finish before taking snapshot
* @default true
*/
waitForProgressive?: boolean;
/**
* Number of progressive frames to wait for before taking snapshot
@default 64 or {@link ProgressivePlugin.maxFrameCount}, whichever is higher
*/
progressiveFrames?: number;
/**
* Time in ms to wait before taking the snapshot.
* This timeout is applied before `waitForProgressive` if both are specified.
*/
timeout?: number;
/**
* Number of tile rows to split the image into
* @default 1
*/
tileRows?: number;
/**
* Number of tile columns to split the image into
*/
tileColumns?: number;
}
export declare class CanvasSnapshotPlugin extends AViewerPluginSync {
static readonly PluginType = "CanvasSnapshotPlugin";
enabled: boolean;
constructor();
/**
* Returns a File object with screenshot of the viewer canvas
* @param filename default is {@link CanvasSnapshotPlugin.filename}
* @param options waitForProgressive: wait for progressive rendering to finish, default: true
*/
getFile(filename?: string, options?: CanvasSnapshotPluginOptions): Promise<File | undefined>;
/**
* Returns a data url of the screenshot of the viewer canvas
* @param options waitForProgressive: wait for progressive rendering to finish, default: true
*/
getDataUrl(options?: CanvasSnapshotPluginOptions): Promise<string>;
private _getFile;
filename: string;
private _downloading;
/**
* Only for {@link downloadSnapshot} and functions using that
*/
defaultOptions: CanvasSnapshotPluginOptions;
downloadSnapshot(filename?: string, options?: CanvasSnapshotPluginOptions): Promise<void>;
protected _downloadPng(): Promise<void>;
protected _downloadJpeg(): Promise<void>;
protected _downloadWebp(): Promise<void>;
}
/**
* @deprecated - use {@link CanvasSnapshotPlugin}
*/
export declare class CanvasSnipperPlugin extends CanvasSnapshotPlugin {
static readonly PluginType: any;
constructor();
}
//# sourceMappingURL=../../src/plugins/export/CanvasSnapshotPlugin.d.ts.map