Commit 04a91fd3 authored by Alfakhori's avatar Alfakhori
Browse files

fix end function

parent d2df398a
Pipeline #12468 passed with stage
in 25 seconds
...@@ -1210,24 +1210,44 @@ async function activateXR(sceneData = null) { ...@@ -1210,24 +1210,44 @@ async function activateXR(sceneData = null) {
// AR session ended // AR session ended
// ======================================================== // ========================================================
currentSession.addEventListener("end", () => { currentSession.addEventListener("end", () => {
currentSession = null; // ========================================================
// AR session ended
// ========================================================
// Hide dynamic menu currentSession = null;
document.getElementById("dynamic-menu").style.display = "none"; // Hide dynamic menu
const dynamicMenu = document.getElementById("dynamic-menu");
// Hide all application menus if (dynamicMenu) {
dynamicMenu.style.display = "none";
}
menus.forEach((id) => { // Hide AR-specific menus
const element = menuElements[id]; menus.forEach((id) => {
const element = document.getElementById(id);
if (element) { if (element) {
element.style.display = "none"; element.style.display = "none";
} }
});
}); });
// ========================================================
// Return to the main page
// Show Start AR / Load Scene buttons again
// ========================================================
const menuBar = document.getElementById("menu-bar");
if (menuBar) {
menuBar.style.display = "flex";
}
// Clear selected model
selectedPlacedModel = null;
});
// ======================================================== // ========================================================
// Select objects in AR // Select objects in AR
// ======================================================== // ========================================================
......
Supports Markdown
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