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

WebXRManager: Clear state and added some accessor functions #22260

Merged
merged 3 commits into from
Aug 4, 2021
Merged

WebXRManager: Clear state and added some accessor functions #22260

merged 3 commits into from
Aug 4, 2021

Conversation

cabanier
Copy link
Contributor

@cabanier cabanier commented Aug 3, 2021

Some of the state wasn't cleaned up in the WebXR manager which could lead to errors.
Also added some helper to give easier access to WebXR state

This contribution is funded by Oculus.


};

this.getxrFrame = function () {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't frame available already in the onAnimationFrame() callback?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but then it has to be passed into the components that would like to have access.
For instance, I was experimenting with creating a cube layer for the background and it was handy to have it available on the xr object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrdoob I can remove it if you prefer

Copy link
Owner

@mrdoob mrdoob Aug 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see...

How about following the naming pattern of the other methods and call it getFrame()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mrdoob mrdoob added this to the r132 milestone Aug 3, 2021
@mrdoob mrdoob changed the title Clear state in WebXR manger + add some accessor functions WebXRManager: Clear state and added some accessor functions Aug 3, 2021
@mrdoob mrdoob merged commit daffe80 into mrdoob:dev Aug 4, 2021
@mrdoob
Copy link
Owner

mrdoob commented Aug 4, 2021

Thanks!

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.

2 participants