We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abbf389 commit 59a061dCopy full SHA for 59a061d
src/App/App.tsx
@@ -67,12 +67,12 @@ export const App = () => {
67
optionalFeatures: ["dom-overlay", "local-floor"],
68
domOverlay: { root: document.getElementById("overlay")! },
69
})
70
- .then((webXRSession) =>
71
- setState({
72
- type: "webXR",
73
- webXRSession,
74
- })
75
- )
+ .then((webXRSession) => {
+ // reset to this state when user end session
+ webXRSession.onend = () => setState({ type: "waiting-user-input" });
+
+ setState({ type: "webXR", webXRSession });
+ })
76
.catch(setError);
77
};
78
0 commit comments