You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -573,6 +573,7 @@ When an {{XRSession}} |session| receives updated [=viewer=] state from the [=/XR
573
573
1. Let |callbacks| be a list of the entries in |session|'s [=list of animation frame callback=], in the order in which they were added to the list.
574
574
1. Set |session|'s [=list of animation frame callbacks=] to the empty list.
575
575
1. Set |frame|'s [=active=] boolean to <code>true</code>.
576
+
1. Set |frame|'s [=animationFrame=] boolean to <code>true</code>.
576
577
1. For each entry in |callbacks|, in order:
577
578
1. If the entry's [=cancelled=] boolean is <code>true</code>, continue to the next entry.
578
579
1. [=Invoke the Web IDL callback function=], passing |now| and |frame| as the arguments
@@ -636,7 +637,7 @@ An {{XRFrame}} represents a snapshot of the state of all of the tracked objects
636
637
};
637
638
</pre>
638
639
639
-
Each {{XRFrame}} has a <dfn for="XRFrame">active</dfn> boolean which is initially set to <code>false</code>.
640
+
Each {{XRFrame}} has a <dfn for="XRFrame">active</dfn> boolean which is initially set to <code>false</code>, and an <dfn for="XRFrame">animationFrame</dfn> boolean which is initially set to <code>false</code>.
640
641
641
642
The <dfn attribute for="XRFrame">session</dfn> attribute returns the {{XRSession}} that produced the {{XRFrame}}.
642
643
@@ -645,6 +646,7 @@ The <dfn attribute for="XRFrame">session</dfn> attribute returns the {{XRSession
645
646
When the <dfn method for="XRFrame">getViewerPose(|referenceSpace|)</dfn> method is invoked, the user agent MUST run the following steps:
646
647
647
648
1. If the {{XRFrame}}'s [=active=] boolean is <code>false</code>, throw a {{InvalidStateError}} and abort these steps.
649
+
1. If the {{XRFrame}}'s [=animationFrame=] boolean is <code>false</code>, throw a {{InvalidStateError}} and abort these steps.
648
650
1. Let |session| be the {{XRFrame}}'s {{XRFrame/session}} object.
649
651
1. If |referenceSpace|'s [=XRSpace/session=] does not equal |session|, throw a {{InvalidStateError}} and abort these steps.
650
652
1. If the [=viewer=]'s pose cannot be determined relative to |referenceSpace|, return <code>null</code>
Copy file name to clipboardExpand all lines: input-explainer.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ function onSessionStarted(session) {
87
87
}
88
88
```
89
89
90
-
All three events are `XRInputSourceEvent` events. When fired the event's `inputSource` attribute will contain the `XRInputSource` that produced the event. The event's `frame` attribute will contain a valid `XRFrame` that can be used to call `getPose()` at the time the selection event occurred. The frame's `getViewerPose()`function will return null.
90
+
All three events are `XRInputSourceEvent` events. When fired the event's `inputSource` attribute will contain the `XRInputSource` that produced the event. The event's `frame` attribute will contain a valid `XRFrame` that can be used to call `getPose()` at the time the selection event occurred. Calling the frame's `getViewerPose()`method will throw an `InvalidState` error.
91
91
92
92
### Transient input sources
93
93
Some input sources are only be added to the list of input sources while an action is occurring. For example, those with an `targetRayMode` of 'screen' or those with `targetRayMode` of 'gaze' which are triggered by a voice command. In these cases, `XRInputSource` is only present in the array returned by `getInputSources()` during the lifetime of the action. In this circumstance, the order of events is as follows:
0 commit comments