Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Screenshot component returns a single line of transparent pixels on the top of each screenshot

Open
#5,259 2 comments 0 reactions 0 assignees View on GitHub

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

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aframevr/aframe

All issues in aframevr/aframe

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.