Screenshot component returns a single line of transparent pixels on the top of each screenshot
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- computer-graphics, frontend
Research direction
Review flipPixelsVertically in src/components/scene/screenshot,js, starting with the provided perspective capture call and the reported y-dimension handling. Reproduce the issue in Firefox 111.0 and verify that screenshots no longer contain a transparent top row while retaining the correct vertical orientation.
Written by the indexing model from the issue text.
Description
Description:
- A-Frame Version: 1.4.1
- Platform / Device: Firefox 111.0
- Reproducible Code Snippet or URL:
The screenshot component returns a single line of transparent pixels on the top of each screenshot when called with:
this.el.sceneEl.components.screenshot.capture('perspective');
I think flipPixelsVertically in src/components/scene/screenshot,js is out-by-one in the y dimension. Taking 1 off the height fixed it for me, eg:
flippedPixels[x * 4 + y * width * 4] = pixels[x * 4 + ((height-1) - y) * width * 4];
flippedPixels[x * 4 + 1 + y * width * 4] = pixels[x * 4 + 1 + ((height-1) - y) * width * 4];
flippedPixels[x * 4 + 2 + y * width * 4] = pixels[x * 4 + 2 + ((height-1) - y) * width * 4];
flippedPixels[x * 4 + 3 + y * width * 4] = pixels[x * 4 + 3 + ((height-1) - y) * width * 4];
Thanks!
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
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.
More from aframevr/aframe
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Uncaught TypeError: Cannot read properties of null (reading 'cancelAnimationFrame') on session end Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
TypeError: session.requestAnimationFrame is not a function when re-entering XR session after exit Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
antfu-collective/icones#398 ·
-
ECmail.com Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
wesbos/burner-email-providers#554 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
components-web-app/docs#92 ·