Commit cfc43234 authored by Jacob DeWitt's avatar Jacob DeWitt Committed by Commit Bot

Fix input-selection.html

Set the origin offset reference space on initialization. Otherwise, that
space will be null on the first call to onXRFrame and getViewerPose will
throw an exception, preventing the page from working.

Change-Id: Icf71ac3c8136e57906d01c3f8a4fdba8650f3495
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629693
Commit-Queue: Jacob DeWitt <jacde@chromium.org>
Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663922}
parent 96ebad74
...@@ -432,6 +432,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ...@@ -432,6 +432,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Save the session-specific reference space, and apply the // Save the session-specific reference space, and apply the
// current player orientation/position as originOffset. // current player orientation/position as originOffset.
setRefSpace(session, refSpace, false); setRefSpace(session, refSpace, false);
updateOriginOffset(session);
session.requestReferenceSpace('viewer').then(function(viewerSpace){ session.requestReferenceSpace('viewer').then(function(viewerSpace){
xrViewerSpace = viewerSpace; xrViewerSpace = viewerSpace;
session.requestAnimationFrame(onXRFrame); session.requestAnimationFrame(onXRFrame);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment