◐ Shell
clean mode source ↗

Spec text for the identity reference space by toji · Pull Request #520 · immersive-web/webxr

NellWaliczek

Choose a reason for hiding this comment

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

Your PR description mentions not including the originOffset changes in this PR. Are you planning to update getPose() and getViewerPose() as part of that change rather than this one?

1. Let |options| be the {{XRReferenceSpaceOptions}} passed to {{requestReferenceSpace()}}.
1. Let |type| be set to |options| {{XRReferenceSpaceOptions/type}}.
1. Let |referenceSpace| be set to <code>null</code>.
1. If |type| is {{identity}} let |referenceSpace| be a new {{XRReferenceSpace}}.

Choose a reason for hiding this comment

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

Don't we also need to error if a subtype is present?

Choose a reason for hiding this comment

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

We don't really need to, in my opinion. If you passed in any other non-applicable values in the dictionary (ie: { type: 'identity', foo: 'bar' }) then we just ignore it, so that feels like it could carry over to this as well? Then again, if you passed a subtype that wasn't valid the IDL would cause it to naturally error whether or not the type uses it, so maybe being more rigorous about it isn't a bad idea? IDK.

Choose a reason for hiding this comment

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

My general opinion is that we should do what's consistent with the rest of the web on this one. Got an API ergonomics person who wants to give us guidance one way or another?

Choose a reason for hiding this comment

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

I'll poke around and see.