Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GeoVistoogsi
AR
Commits
c02ab0f8
Commit
c02ab0f8
authored
Jan 05, 2025
by
Tomi6545
Browse files
Merge branch 'master' into thomas
parents
b2f6e8e0
67471e62
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/index.html
View file @
c02ab0f8
...
...
@@ -334,6 +334,10 @@
<link
rel=
"stylesheet"
href=
"https://unpkg.com/leaflet/dist/leaflet.css"
/>
<script
src=
"https://unpkg.com/leaflet/dist/leaflet.js"
></script>
<!-- Leaflet einbinden -->
<script
src=
"ar_overviewmap.js"
></script>
<!-- Audio-Element für Button-Klick -->
<audio
id=
"button-sound"
src=
"sounds/button-sound.mp3"
preload=
"auto"
></audio>
<script>
// Variablen
let
selectedModel
=
'
robot
'
;
...
...
@@ -367,6 +371,12 @@
window
.
onload
=
()
=>
{
initializeAddMenu
();
// Fügt Sound zu allen Buttons hinzu
const
buttons
=
document
.
querySelectorAll
(
"
button, .menu-item
"
);
buttons
.
forEach
(
button
=>
{
button
.
addEventListener
(
"
click
"
,
playButtonSound
);
});
};
function
initializeAddMenu
()
{
...
...
@@ -493,6 +503,7 @@
function
completeEditing
()
{
removeHighlightFromSelectedModel
();
closeDynamicMenu
();
selectedPlacedModel
=
null
;
document
.
getElementById
(
'
edit-menu
'
).
style
.
display
=
'
none
'
;
document
.
getElementById
(
'
menu-bar
'
).
style
.
display
=
'
flex
'
;
...
...
@@ -695,6 +706,22 @@
document
.
getElementById
(
'
confirmation-dialog
'
).
style
.
display
=
'
none
'
;
}
let
soundTimeout
=
false
;
function
playButtonSound
()
{
if
(
!
soundTimeout
)
{
const
sound
=
document
.
getElementById
(
"
button-sound
"
);
sound
.
currentTime
=
0
;
sound
.
play
();
soundTimeout
=
true
;
setTimeout
(()
=>
{
soundTimeout
=
false
;
},
200
);
// Verzögerung von 200ms
}
}
if
(
navigator
.
xr
)
{
const
startButton
=
document
.
createElement
(
'
button
'
);
startButton
.
textContent
=
'
Start AR
'
;
...
...
public/sounds/button-sound.mp3
0 → 100644
View file @
c02ab0f8
File added
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