import type { ScreenshotCamera, ScreenshotFormat, ScreenshotPayloadBase } from "@dreamcomposer/engine-types/Screenshot.js"; import { DcController } from "../DcController.js"; export type { ScreenshotCamera, ScreenshotFormat }; /** * Options for a screenshot. */ export type ScreenshotOptions = ScreenshotPayloadBase; /** * The image of a screenshot. */ export interface Screenshot { /** * The image as a data URL. */ data: string; width: number; height: number; /** * The format the image was encoded in, which is the requested one unless * the browser had no encoder for it and fell back to PNG. */ format: ScreenshotFormat; } /** * Renders a screenshot of the scene and returns the image. * * @param dcController The DcController object obtained from the init function. * @param options The options for the screenshot. * @returns A promise that resolves with the image once it has been rendered. */ export declare function takeScreenshot(dcController: DcController, options?: ScreenshotOptions): Promise; /** * Downloads a screenshot of the scene, in the PNG format unless `options` name * another one. * * The download starts automatically once the screenshot has been rendered. * * @param dcController The DcController object obtained from the init function. * @param options The options for the screenshot. * @returns A promise that resolves when screenshot has been downloaded. */ export declare function downloadScreenshot(dcController: DcController, options: ScreenshotOptions & { /** * The file name of the screenshot, extension included. * * Nothing reconciles it with `format` - a name is saved as it is given, * so a `format` other than the default needs an extension to match. */ fileName: string; }): Promise;