Skip to content

Screenshot

Capture the current rendered frame and download it as an image.

Usage

ts
import { Screenshot } from '@threeuse/core/plugins'

app.use(Screenshot, { format: 'png' })

button.addEventListener('click', () => {
  app.$screenshot.capture('my-scene.png')
})

Options

OptionTypeDefaultDescription
format'png' | 'jpeg''png'Image format
qualitynumber0.95JPEG quality (0–1)

Demo

Released under the MIT License.