Skip to content

Suggestion: Expose requestAnimationFrameFunctions and spiedWindow in main script #258

New issue

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

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

Already on GitHub? # to your account

Closed
De-Panther opened this issue May 1, 2023 · 3 comments · Fixed by #259
Closed

Comments

@De-Panther
Copy link
Contributor

There are some cases where the window.rAF is packed by other scopes to add functionalities to it. (e.g. some XR emulators or for cases of rendering frames selectively)

Following the WebXR PR #257
I think that similar to how the requestAnimationFrameFunctions and spiedWindow were exposed for xrSpy, it would be nice to add an option to set them from the main Spector.js script as well.

spector = new SPECTOR.Spector();
spector.addRequestAnimationFrameFunctionName("customRafName");
spector.setSpiedWindow(referenceToScope); // or spector.setSpiedScope
spector.displayUI();
@sebavan
Copy link
Member

sebavan commented May 9, 2023

Do you want to make a PR for it ?

@De-Panther
Copy link
Contributor Author

Do you want to make a PR for it ?

Sure.
Is renaming 'spiedWindow' to 'spiedScope' and adding 'setSpiedScope' is ok?

@sebavan
Copy link
Member

sebavan commented May 10, 2023

Sure, but can you comment for this on the other PR #257 ? lets avoid changing it after release ?

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

Successfully merging a pull request may close this issue.

2 participants