Screenshot size in VR Mode broken (?)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
I'm currently trying to create programmatically a screenshot from a mobile device (in this case an Android device w/ Google Crome). Following the documentation I tried using the following code in html
<a-scene screenshot="width: 480; height: 360">
to set the desired dimension and then
var canvas = document.querySelector('a-scene').components.screenshot.getCanvas('perspective');
console.log(canvas.toDataURL("image/jpeg", 0.5))
While this works perfectly fine on desktop and mobile (not VR), in the VR mode the screenshot function actually captures the screen from the bottom left point of the canvas (0,0) to the size I specified (height: 360, width: 480)
Is this a desired behaviour? If so, how can I change my code to capture the canvas focusing the center of it?
- A-Frame Version: 0.9.0
- Platform / Device: Android
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the a-scene screenshot component and the getCanvas('perspective') entry point described in the report. Reproduce the configured 480x360 capture on Android in VR mode and compare its canvas origin with desktop and non-VR behavior. Done means the requested dimensions capture the centered view rather than the canvas's bottom-left region.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- ar-vr-xr, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100