Skip to content

Commit

Permalink
example of calling the component in JS (aframevr#2288)
Browse files Browse the repository at this point in the history
Example showing that the component can be called programmatically and thus become part of an explicit interface.
  • Loading branch information
Utopiah authored and dmarcos committed Jan 17, 2017
1 parent 5cc2426 commit 46f8e36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/components/screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ To take a normal (perspective) screenshot, use the keyboard shortcut (`<ctrl> +
To take a 360&deg; (equirectangular) screenshot, use the keyboard shortcut
(`<ctrl> + <alt> + <shift> +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
Expand Down

0 comments on commit 46f8e36

Please sign in to comment.