Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup canvas on first capture screenshot.js #5442

Merged
merged 9 commits into from
Feb 2, 2024

Conversation

arpu
Copy link
Contributor

@arpu arpu commented Feb 1, 2024

Description:
The default Screenshot Component always creates a shader and canvas on init()
this PR change it on first usage of screenshot capture.

Changes proposed:
-set canvas on first capture usage

@dmarcos
Copy link
Member

dmarcos commented Feb 2, 2024

Thank you!

@dmarcos dmarcos merged commit e489e5a into aframevr:master Feb 2, 2024
1 check passed
@mrxz
Copy link
Contributor

mrxz commented Mar 14, 2024

@arpu This PR causes a regression when people use the screenshot component in the following way:

document.querySelector('a-scene').components.screenshot.getCanvas('perspective');

The getCanvas is part of its public API and documented in case the user doesn't want to automatically download the file, but do something else with it. See https://aframe.io/docs/1.5.0/components/screenshot.html#methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants