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

Further spec out when the gamepad state is updated #22

Merged
merged 5 commits into from
Nov 21, 2019

Conversation

Manishearth
Copy link
Contributor

/fixes #18

It would be cleaner to spec an independent concept of "process a frame" in the webxr spec, but for now tying it to the creation of the XRFrame keeps this self-contained in this spec.

r? @NellWaliczek @toji

Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

LGTM.

@NellWaliczek NellWaliczek added this to the October 2019 milestone Oct 21, 2019
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
Copy link
Member

@NellWaliczek NellWaliczek left a comment

Choose a reason for hiding this comment

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

A few last questions for you!

index.bs Outdated
To <dfn for=XRFrame>apply gamepad frame updates</dfn> for an {{XRFrame}} |frame|, the user agent MUST run the following steps:

1. For each {{XRInputSource}} with a {{XRInputSource/gamepad}} |gamepad| associated with |frame|'s {{XRFrame/session}}, perform the following steps:
1. Update |gamepad| to reflect the gamepad state at |frame|'s [=XRFrame/time=].
Copy link
Member

Choose a reason for hiding this comment

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

Is there an update algorithm we can refer to from the Gamepad API? Because this is a bit vauge. Which properties will be changed and where does the data come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah, part of the whole problem here is that Gamepad doesn't talk about liveness at all, so this stuff is already super vague and implicit there. The gamepad spec uses the word "data" a lot instead of "state", I've changed this to use that, but it's not a dfn or used super consistently.

Once w3c/gamepad#8 is fixed we shall probably have better tools for talking about this.

index.bs Outdated
XRFrame {#xrframe-interface}
------------

The [=XRFrame/apply frame updates=] steps are modified to include [=apply gamepad frame updates=].
Copy link
Member

Choose a reason for hiding this comment

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

Is there anything we should be doing (perhaps in the other PR) to indicate that steps from other spec documents shouldn't have any ordering dependencies on each other?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add a blurb to the other PR.

@toji toji modified the milestones: October 2019, November 2019 Nov 21, 2019
@Manishearth Manishearth merged commit 767b3f3 into immersive-web:master Nov 21, 2019
@Manishearth Manishearth deleted the gamepad-state branch November 21, 2019 19:20
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.

Ensure that the returned gamepad object is live
3 participants