diff --git a/index.bs b/index.bs index 388a1a27..965fc951 100755 --- a/index.bs +++ b/index.bs @@ -630,6 +630,7 @@ enum XRVisibilityState { readonly attribute Float32Array? supportedFrameRates; [SameObject] readonly attribute XRRenderState renderState; [SameObject] readonly attribute XRInputSourceArray inputSources; + [SameObject] readonly attribute XRInputSourceArray trackedSources; readonly attribute FrozenArray<DOMString> enabledFeatures; readonly attribute boolean isSystemKeyboardSupported; @@ -831,12 +832,14 @@ When this method is invoked, the user agent MUST run the following steps: -Each {{XRSession}} has a list of active XR input sources (a [=/list=] of {{XRInputSource}}) which MUST be initially an empty [=/list=]. +Each {{XRSession}} has a list of active XR input sources (a [=/list=] of {{XRInputSource}}) and a list of active XR tracked sources (a [=/list=] of {{XRInputSource}}) which MUST both be initially an empty [=/list=]. Each {{XRSession}} has an XR device, which is an [=/XR device=] set at initialization. The inputSources attribute returns the {{XRSession}}'s [=list of active XR input sources=]. +The trackedSources attribute returns the {{XRSession}}'s [=list of active XR tracked sources=]. + 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. Each {{XRSession}} has a promise resolved flag, initially `false`. @@ -848,13 +851,23 @@ NOTE: The purpose of this flag is to ensure that the [=XRSession/add input sourc When new [=XR input source=]s become available for {{XRSession}} |session|, the user agent MUST run the following steps: 1. If |session|'s [=XRSession/promise resolved=] flag is not set, abort these steps. - 1. Let |added| be a new [=/list=]. + 1. Let |added primary sources| be a new [=/list=]. + 1. Let |added tracked sources| be a new [=/list=]. 1. For each new [=XR input source=]: - 1. Let |inputSource| be a [=new=] {{XRInputSource}} in the [=relevant realm=] of this {{XRSession}}. - 1. Add |inputSource| to |added|. + 1. Let |inputSource| be a [=new=] {{XRInputSource}} in the [=relevant realm=] of this {{XRSession}}, then perform the following step: +
[SecureContext, Exposed=Window] @@ -2482,7 +2525,6 @@ The added attribute is a [= The removed attribute is a [=/list=] of {{XRInputSource}}s that were removed from the {{XRSession}} at the time of the event. - XRReferenceSpaceEvent {#xrreferencespaceevent-interface} --------------------- @@ -2519,6 +2561,8 @@ A user agent MUST [=fire an event=] named end u A user agent MUST [=fire an event=] named inputsourceschange using {{XRInputSourcesChangeEvent}} on an {{XRSession}} when the session's [=list of active XR input sources=] has changed. +A user agent MUST [=fire an event=] named trackedsourceschange using {{XRInputSourcesChangeEvent}} on an {{XRSession}} when the session's [=list of active XR tracked sources=] has changed. + A user agent MUST [=fire an event=] named selectstart using {{XRInputSourceEvent}} on an {{XRSession}} when one of its {{XRInputSource}}s begins its [=primary action=]. The event MUST be of type . A user agent MUST [=fire an event=] named selectend using {{XRInputSourceEvent}} on an {{XRSession}} when one of its {{XRInputSource}}s ends its [=primary action=] or when an {{XRInputSource}} that has begun a [=primary action=] is disconnected.