Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alfakhori
Gengenbach
Commits
39b81337
Commit
39b81337
authored
Sep 29, 2026
by
Alfakhori
Browse files
fix end function
parent
29e6ece1
Pipeline
#12471
passed with stage
in 19 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
public/ar_main.js
View file @
39b81337
...
...
@@ -1208,63 +1208,16 @@ async function activateXR(sceneData = null) {
// ========================================================
// AR session ended
// Reload the complete website
// ========================================================
currentSession
.
addEventListener
(
"
end
"
,
()
=>
{
console
.
log
(
"
AR session ended
"
);
// ====================================================
// Stop the AR session reference
// ====================================================
currentSession
=
null
;
// ====================================================
// Remove the XR canvas
//
// This prevents the dark/black screen from remaining
// over the normal start page.
// ====================================================
if
(
canvas
&&
canvas
.
parentNode
)
{
canvas
.
parentNode
.
removeChild
(
canvas
);
}
// ====================================================
// Hide dynamic AR menu
// ====================================================
const
dynamicMenu
=
document
.
getElementById
(
"
dynamic-menu
"
);
if
(
dynamicMenu
)
{
dynamicMenu
.
style
.
display
=
"
none
"
;
}
// ====================================================
// Hide AR menus
// ====================================================
menus
.
forEach
((
id
)
=>
{
const
element
=
document
.
getElementById
(
id
);
if
(
element
)
{
element
.
style
.
display
=
"
none
"
;
}
});
// ====================================================
// Clear selected model
// ====================================================
selectedPlacedModel
=
null
;
// ====================================================
// Return to the normal start page
// ====================================================
if
(
typeof
showStartScreen
===
"
function
"
)
{
showStartScreen
();
}
// Completely reload the website.
// This resets the AR canvas, menus, scene, map,
// variables, and all other application state.
window
.
location
.
reload
();
});
// ========================================================
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment