Skip to content

Instantly share code, notes, and snippets.

@makihiro
Created March 9, 2020 06:12
Show Gist options
  • Save makihiro/e7edf9a31788eee601b24dd7e29a0ff5 to your computer and use it in GitHub Desktop.
Save makihiro/e7edf9a31788eee601b24dd7e29a0ff5 to your computer and use it in GitHub Desktop.
//L135-146,onSessionStarted内
session.requestReferenceSpace('viewer').then((refSpace) => {
xrViewerSpace = refSpace;
session.requestHitTestSource({ space: xrViewerSpace }).then((hitTestSource) => {
xrHitTestSource = hitTestSource; //hit testの要求
});
});
session.requestReferenceSpace('local').then((refSpace) => {
xrRefSpace = refSpace;
session.requestAnimationFrame(onXRFrame); //Render loop処理のコール
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment