diff --git a/docs/components/screenshot.md b/docs/components/screenshot.md index aca1fbee283..be5958825d0 100644 --- a/docs/components/screenshot.md +++ b/docs/components/screenshot.md @@ -15,6 +15,14 @@ To take a normal (perspective) screenshot, use the keyboard shortcut (` + To take a 360° (equirectangular) screenshot, use the keyboard shortcut (` + + +s`). +To take a screenshot programmatically, call the component + +```javascript +// assuming your current scene is represented by sceneEl +sceneEl.components.screenshot.capture('perspective') +// projection property can be perspective or equirectangular +``` + ## Example Unless we wish to customize the screenshot, explicitly setting the screenshot