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

Should XRAnchor extend XRSpace #17

Closed
blairmacintyre opened this issue Apr 18, 2019 · 4 comments
Closed

Should XRAnchor extend XRSpace #17

blairmacintyre opened this issue Apr 18, 2019 · 4 comments

Comments

@blairmacintyre
Copy link
Contributor

It will be super useful to be able to use anchors as spaces to convert coordinate systems between each other.

@bialpio
Copy link
Contributor

bialpio commented Jun 24, 2019

Could we achieve the same thing by making Anchors have an XRSpace attribute (“has-a” vs “is-a” relationship)? I’m not sure if there are any guidelines about API design that we should follow here.

Additionally, if we do decide on making anchors be XRSpaces / XRReferenceSpaces, we can consider extending XRSession.requestReferenceSpace() to allow for anchor creation instead of having an additional method to do so.

@thetuvix
Copy link
Contributor

thetuvix commented Jul 9, 2019

Anchors should definitely provide a space for coordinate transforms. I'm less sure if they should directly be spaces.

We already have cases of WebXR types such as input sources that are then composed of multiple spaces (e.g. grip space and target ray space). It seems fairly clean to run with that pattern - apps create logical objects such as anchors that can then be composed of 1 or more spaces through a "has-a" relationship.

@Manishearth
Copy link

Could we achieve the same thing by making Anchors have an XRSpace attribute (“has-a” vs “is-a” relationship)?

👍, we do something similar for input sources. Input sources have an XRSpace, they are not XRSpaces themselves.

@bialpio
Copy link
Contributor

bialpio commented Mar 16, 2020

Closing the issue. Current approach seems to be to expose XRSpaces via "has-a" relationship. Please reopen if you disagree.

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

No branches or pull requests

4 participants