-
Notifications
You must be signed in to change notification settings - Fork 48
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
Editorial: add a Model section #136
Open
nondebug
wants to merge
5
commits into
w3c:gh-pages
Choose a base branch
from
nondebug:add-model
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bcfe048
Add a Model section
nondebug 9ff1216
Update index.html
nondebug 215a761
Merge branch 'gh-pages' into add-model
9200fdc
Merge branch 'gh-pages' into add-model
marcoscaceres a51eb0f
Merge branch 'gh-pages' into add-model
marcoscaceres File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -136,6 +136,68 @@ <h2> | |||||||||
sensing, depth sensing, video analysis, gesture recognition, and so on. | ||||||||||
</p> | ||||||||||
</section> | ||||||||||
|
||||||||||
<section> | ||||||||||
<h2> | ||||||||||
Model | ||||||||||
</h2> | ||||||||||
<p> | ||||||||||
A <dfn>gamepad</dfn> is a physical or virtual input device that provides | ||||||||||
button and/or axis inputs. The <dfn>host</dfn> is the operating system | ||||||||||
environment hosting the user agent. The host provides an algorithm for | ||||||||||
<dfn data-lt="enumerating">enumerating connected gamepads</dfn>. A | ||||||||||
gamepad is considered <dfn>connected</dfn> when the host is capable of | ||||||||||
reading new inputs. A gamepad that is not connected is | ||||||||||
<dfn>disconnected</dfn>. | ||||||||||
</p> | ||||||||||
<p> | ||||||||||
The [=host=] provides an algorithm for synchronously | ||||||||||
<dfn>reading input data</dfn> from the gamepad. If the host does not | ||||||||||
provide such an algorithm, the user agent MAY implement an algorithm | ||||||||||
that caches the most recent input data and synchronously returns the | ||||||||||
cached value. | ||||||||||
</p> | ||||||||||
<p> | ||||||||||
When a gamepad transitions from disconnected to connected, it | ||||||||||
<dfn>becomes connected</dfn>. Likewise, when a gamepad transitions from | ||||||||||
connected to disconnected, it <dfn>becomes disconnected</dfn>. The host | ||||||||||
provides algorithms to register listeners for these transitions. If | ||||||||||
these events are not available, the user agent MAY implement an | ||||||||||
algorithm that synthesizes the events by periodically enumerating | ||||||||||
connected gamepads. | ||||||||||
</p> | ||||||||||
<p> | ||||||||||
The user agent MUST define a <dfn>gamepad user gesture</dfn>. A gamepad | ||||||||||
user gesture is a class of gamepad input state transitions that signify | ||||||||||
that the user is interacting with the gamepad. At a minimum, the gamepad | ||||||||||
user gesture MUST include state changes where any button transitions | ||||||||||
from unpressed to pressed. Other transitions can be included as user | ||||||||||
gestures. A transition MUST NOT be included if the transition could | ||||||||||
occur without user interaction. | ||||||||||
</p> | ||||||||||
<p> | ||||||||||
The user agent MUST NOT expose information about connected gamepads | ||||||||||
until a gamepad user gesture has been received from any connected | ||||||||||
gamepad. The user gesture MUST be tracked independently for each gamepad | ||||||||||
context. A <dfn>gamepad context</dfn> MUST be created when a page first | ||||||||||
requests the current gamepad state or registers for gamepad connection | ||||||||||
events. The gamepad context MUST be destroyed when the tab is closed or | ||||||||||
navigates away from the current page. Reloading the current page MUST | ||||||||||
NOT destroy the gamepad context. | ||||||||||
</p> | ||||||||||
<div class="issue"> | ||||||||||
<p>TODO: Integrate the gamepad context lifetime with the HTML spec.</p> | ||||||||||
</div> | ||||||||||
To register a user gesture, a gamepad context MUST be active. A gamepad | ||||||||||
context is <dfn>active</dfn> if the document associated with the context | ||||||||||
is [=Document/visible=]. If the document is [=Document/hidden=], the | ||||||||||
Comment on lines
+192
to
+193
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
context is inactive. When a context is first created or when it | ||||||||||
transitions from inactive to active, it <dfn>becomes active</dfn>. | ||||||||||
Likewise, when it transitions from active to inactive, it <dfn>becomes | ||||||||||
inactive</dfn>. | ||||||||||
</p> | ||||||||||
</section> | ||||||||||
|
||||||||||
<section data-dfn-for="Gamepad" data-link-for="Gamepad"> | ||||||||||
<h2> | ||||||||||
<dfn>Gamepad</dfn> interface | ||||||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Determining "active" is effectively and algorithm, so we should specify it as such.