---
title: captureScreenshot
slug: viewer-3d/methods/captureScreenshot
docTags: 
createdAt: 2024-03-01T14:17:48.682Z
---

Takes a screenshot of the scene in PNG format.

## Example

::codepen{url="https://codepen.io/Catenda/embed/poXwmjj"}

## Usage

```javascript
const imageDataPromise = viewer3d.captureScreenshot();
```

## Return Value

Promise that resolves to the base64 encoded string of the PNG image.

| **Type**            |
| ------------------- |
| `Promise => String` |

