Skip to content

Commit 23547b1

Browse files
authored
Merge pull request #1432 from cabanier/tracked-sources
made tracked sources an optional feature
2 parents f9687e2 + 1337e64 commit 23547b1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

index.bs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ The <dfn dict-member for="XRSessionInit">optionalFeatures</dfn> array contains a
533533
Values given in the feature lists are considered a valid <dfn>feature descriptor</dfn> if the value is one of the following:
534534

535535
- The string representation of any {{XRReferenceSpaceType}} enum value
536+
- The string "<dfn for="feature descriptor">tracked-sources</dfn>"
536537

537538
Future iterations of this specification and additional modules may expand the list of accepted [=feature descriptors=].
538539

@@ -837,7 +838,7 @@ Each {{XRSession}} has an <dfn for="XRSession">XR device</dfn>, which is an [=/X
837838

838839
The <dfn attribute for="XRSession">inputSources</dfn> attribute returns the {{XRSession}}'s [=list of active XR input sources=].
839840

840-
The <dfn attribute for="XRSession">trackedSources</dfn> attribute returns the {{XRSession}}'s [=list of active XR tracked sources=].
841+
The <dfn attribute for="XRSession">trackedSources</dfn> attribute returns the {{XRSession}}'s [=list of active XR tracked sources=]. The [=list of active XR tracked sources=] MUST only be populated if {{feature descriptor/"tracked-sources"}} is included in the [=XRSession/set of granted features=].
841842

842843
The user agent MUST monitor any [=XR input source=]s associated with the [=XRSession/XR device=], including detecting when [=XR input source=]s are added, removed, or changed.
843844

@@ -858,7 +859,7 @@ When <dfn for="XRSession" lt="add input source">new [=XR input source=]s become
858859
: If |inputSource| is a [=primary input source=]:
859860
::
860861
Add |inputSource| to |added primary sources|.
861-
: Otherwise:
862+
: Otherwise, if {{feature descriptor/"tracked-sources"}} is included in |session|'s [=XRSession/set of granted features=]:
862863
::
863864
Add |inputSource| to |added tracked sources|.
864865
</dl>
@@ -883,7 +884,7 @@ When any previously added <dfn for="XRSession" lt="remove input source">[=XR inp
883884
: If |inputSource| is a [=primary input source=]:
884885
::
885886
Add |inputSource| to |removed primary sources|.
886-
: Otherwise:
887+
: Otherwise, if {{feature descriptor/"tracked-sources"}} is included in |session|'s [=XRSession/set of granted features=]:
887888
::
888889
Add |inputSource| to |removed tracked sources|.
889890
</dl>
@@ -912,7 +913,7 @@ When the <dfn for="XRSession" export lt="change input source">{{XRInputSource/ha
912913
: If |oldInputSource| is a [=primary input source=] or its state changed from a [=primary input source=] to [=tracked input source=] a:
913914
::
914915
Add |oldInputSource| to |removed primary sources|.
915-
: Otherwise:
916+
: Otherwise, if {{feature descriptor/"tracked-sources"}} is included in |session|'s [=XRSession/set of granted features=]:
916917
::
917918
Add |oldInputSource| to |removed tracked sources|.
918919
</dl>
@@ -921,7 +922,7 @@ When the <dfn for="XRSession" export lt="change input source">{{XRInputSource/ha
921922
: If |newInputSource| is a [=primary input source=] or its state changed from a [=tracked input source=] to [=primary input source=] :
922923
::
923924
Add |newInputSource| to |added primary sources|.
924-
: Otherwise:
925+
: Otherwise, if {{feature descriptor/"tracked-sources"}} is included in |session|'s [=XRSession/set of granted features=]:
925926
::
926927
Add |newInputSource| to |added tracked sources|.
927928
</dl>
@@ -2653,7 +2654,7 @@ A user agent MUST [=fire an event=] named <dfn event for="XRSession">end</dfn> u
26532654

26542655
A user agent MUST [=fire an event=] named <dfn event for="XRSession">inputsourceschange</dfn> using {{XRInputSourcesChangeEvent}} on an {{XRSession}} when the session's [=list of active XR input sources=] has changed.
26552656

2656-
A user agent MUST [=fire an event=] named <dfn event for="XRSession">trackedsourceschange</dfn> using {{XRInputSourcesChangeEvent}} on an {{XRSession}} when the session's [=list of active XR tracked sources=] has changed.
2657+
A user agent MUST [=fire an event=] named <dfn event for="XRSession">trackedsourceschange</dfn> using {{XRInputSourcesChangeEvent}} on an {{XRSession}} when the session's [=list of active XR tracked sources=] has changed. This event MUST only be fired if {{feature descriptor/"tracked-sources"}} is included in the session's [=XRSession/set of granted features=].
26572658

26582659
A user agent MUST [=fire an event=] named <dfn event for="XRSession">selectstart</dfn> using {{XRInputSourceEvent}} on an {{XRSession}} when one of its {{XRInputSource}}s begins its [=primary action=]. The event MUST be of type .
26592660

0 commit comments

Comments
 (0)