takeScreenshot

This method generates a screenshot(image/png) of the current camera view with a height of 2160px, or you can specify your own, while preserving the aspect ratio of the current canvas. The return data is the url from the generated image.

takeScreenshot(
	height?: number
): Promise<string>

Parameters
Description
Type

height

The height which the screenshot will have

number

Usage:

await modelApi.takeScreenshot(1024);

Return value:

"data:image/png;base64,<data>"

Last updated