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
ea7f3be7
Commit
ea7f3be7
authored
Sep 29, 2026
by
Alfakhori
Browse files
change background
parent
0333f048
Pipeline
#12473
passed with stage
in 23 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/ar_start.js
View file @
ea7f3be7
...
@@ -18,6 +18,11 @@ let predefinedButton2 = null;
...
@@ -18,6 +18,11 @@ let predefinedButton2 = null;
async
function
loadPredefinedScene
(
filePath
,
fileName
)
{
async
function
loadPredefinedScene
(
filePath
,
fileName
)
{
try
{
try
{
const
response
=
await
fetch
(
filePath
);
const
response
=
await
fetch
(
filePath
);
if
(
!
response
.
ok
)
{
throw
new
Error
(
`HTTP
${
response
.
status
}
`
);
}
const
data
=
await
response
.
json
();
const
data
=
await
response
.
json
();
sceneData
=
data
;
sceneData
=
data
;
...
@@ -25,11 +30,11 @@ async function loadPredefinedScene(filePath, fileName) {
...
@@ -25,11 +30,11 @@ async function loadPredefinedScene(filePath, fileName) {
console
.
log
(
"
Vordefinierte Szene geladen:
"
,
fileName
);
console
.
log
(
"
Vordefinierte Szene geladen:
"
,
fileName
);
return
true
;
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
console
.
error
(
"
Fehler beim Laden der vordefinierten Szene:
"
,
error
);
"
Fehler beim Laden der vordefinierten Szene:
"
,
error
return
false
;
);
}
}
}
}
...
@@ -51,54 +56,46 @@ function showStartScreen() {
...
@@ -51,54 +56,46 @@ function showStartScreen() {
startButton
.
textContent
=
"
Start AR
"
;
startButton
.
textContent
=
"
Start AR
"
;
startButton
.
style
.
cssText
=
startButton
.
classList
.
add
(
"
start-screen-button
"
,
"
start-ar-button
"
);
"
position: fixed;
"
+
"
top: 45%;
"
+
"
left: 50%;
"
+
"
transform: translate(-50%, -50%);
"
+
"
padding: 15px;
"
+
"
font-size: 18px;
"
;
document
.
body
.
appendChild
(
startButton
);
document
.
body
.
appendChild
(
startButton
);
/* ========================= */
/* ========================= */
/* LOAD SCENE
*/
/* LOAD SCENE */
/* ========================= */
/* ========================= */
loadButton
=
document
.
createElement
(
"
button
"
);
loadButton
=
document
.
createElement
(
"
button
"
);
loadButton
.
textContent
=
sceneFileName
||
"
Umgebung Laden
"
;
loadButton
.
textContent
=
sceneFileName
||
"
Umgebung Laden
"
;
loadButton
.
style
.
cssText
=
loadButton
.
classList
.
add
(
"
position: fixed;
"
+
"
start-screen-button
"
,
"
top: 55%;
"
+
"
load-scene-button
"
,
"
left: 50%;
"
+
"
scene-button
"
,
"
transform: translate(-50%, -50%);
"
+
);
"
padding: 15px;
"
+
"
font-size: 18px;
"
;
document
.
body
.
appendChild
(
loadButton
);
document
.
body
.
appendChild
(
loadButton
);
/* ========================= */
/* ========================= */
/* START AR CLICK
*/
/* START AR CLICK */
/* ========================= */
/* ========================= */
startButton
.
onclick
=
()
=>
{
startButton
.
onclick
=
()
=>
{
// Remove start-page buttons
// Remove start-page buttons
startButton
.
remove
();
startButton
.
remove
();
loadButton
.
remove
();
loadButton
.
remove
();
predefinedButton1
.
remove
();
predefinedButton1
.
remove
();
predefinedButton2
.
remove
();
predefinedButton2
.
remove
();
// Reset references
// Reset references
startButton
=
null
;
startButton
=
null
;
loadButton
=
null
;
loadButton
=
null
;
predefinedButton1
=
null
;
predefinedButton1
=
null
;
predefinedButton2
=
null
;
predefinedButton2
=
null
;
// Start AR
// Start AR
activateXR
(
sceneData
);
activateXR
(
sceneData
);
};
};
/* ========================= */
/* ========================= */
/* LOAD SCENE CLICK */
/* LOAD SCENE CLICK */
...
@@ -111,11 +108,19 @@ startButton.onclick = () => {
...
@@ -111,11 +108,19 @@ startButton.onclick = () => {
sceneFileName
=
fileName
;
sceneFileName
=
fileName
;
loadButton
.
textContent
=
fileName
;
loadButton
.
textContent
=
fileName
;
// Mark uploaded scene as selected
loadButton
.
classList
.
add
(
"
selected
"
);
// Deselect predefined scenes
predefinedButton1
.
classList
.
remove
(
"
selected
"
);
predefinedButton2
.
classList
.
remove
(
"
selected
"
);
}
else
{
}
else
{
loadButton
.
textContent
=
sceneFileName
||
"
Umgebung Laden
"
;
loadButton
.
textContent
=
sceneFileName
||
"
Umgebung Laden
"
;
}
}
});
});
};
};
/* ========================= */
/* ========================= */
/* PREDEFINED SCENE 1 */
/* PREDEFINED SCENE 1 */
/* ========================= */
/* ========================= */
...
@@ -124,23 +129,30 @@ startButton.onclick = () => {
...
@@ -124,23 +129,30 @@ startButton.onclick = () => {
predefinedButton1
.
textContent
=
"
Gengenbach Plaza
"
;
predefinedButton1
.
textContent
=
"
Gengenbach Plaza
"
;
predefinedButton1
.
style
.
cssText
=
predefinedButton1
.
classList
.
add
(
"
position: fixed;
"
+
"
start-screen-button
"
,
"
top: 65%;
"
+
"
predefined-scene-button-1
"
,
"
left: 50%;
"
+
"
scene-button
"
,
"
transform: translate(-50%, -50%);
"
+
);
"
padding: 15px;
"
+
"
font-size: 18px;
"
;
document
.
body
.
appendChild
(
predefinedButton1
);
document
.
body
.
appendChild
(
predefinedButton1
);
predefinedButton1
.
onclick
=
async
()
=>
{
predefinedButton1
.
onclick
=
async
()
=>
{
await
loadPredefinedScene
(
const
success
=
await
loadPredefinedScene
(
"
scenes/gengenbach-plaza.json
"
,
"
scenes/gengenbach-plaza.json
"
,
"
Gengenbach Plaza
"
,
"
Gengenbach Plaza
"
,
);
);
predefinedButton1
.
textContent
=
sceneFileName
;
if
(
success
)
{
// Select Plaza
predefinedButton1
.
classList
.
add
(
"
selected
"
);
// Deselect Street
predefinedButton2
.
classList
.
remove
(
"
selected
"
);
// Deselect uploaded scene
loadButton
.
classList
.
remove
(
"
selected
"
);
}
};
};
/* ========================= */
/* ========================= */
...
@@ -151,28 +163,35 @@ startButton.onclick = () => {
...
@@ -151,28 +163,35 @@ startButton.onclick = () => {
predefinedButton2
.
textContent
=
"
Gengenbach Street
"
;
predefinedButton2
.
textContent
=
"
Gengenbach Street
"
;
predefinedButton2
.
style
.
cssText
=
predefinedButton2
.
classList
.
add
(
"
position: fixed;
"
+
"
start-screen-button
"
,
"
top: 75%;
"
+
"
predefined-scene-button-2
"
,
"
left: 50%;
"
+
"
scene-button
"
,
"
transform: translate(-50%, -50%);
"
+
);
"
padding: 15px;
"
+
"
font-size: 18px;
"
;
document
.
body
.
appendChild
(
predefinedButton2
);
document
.
body
.
appendChild
(
predefinedButton2
);
predefinedButton2
.
onclick
=
async
()
=>
{
predefinedButton2
.
onclick
=
async
()
=>
{
await
loadPredefinedScene
(
const
success
=
await
loadPredefinedScene
(
"
scenes/gengenbach-street.json
"
,
"
scenes/gengenbach-street.json
"
,
"
Gengenbach Street
"
,
"
Gengenbach Street
"
,
);
);
predefinedButton2
.
textContent
=
sceneFileName
;
if
(
success
)
{
// Select Street
predefinedButton2
.
classList
.
add
(
"
selected
"
);
// Deselect Plaza
predefinedButton1
.
classList
.
remove
(
"
selected
"
);
// Deselect uploaded scene
loadButton
.
classList
.
remove
(
"
selected
"
);
}
};
};
}
}
/* ========================= */
/* ========================= */
/* INITIAL START
*/
/* INITIAL START */
/* ========================= */
/* ========================= */
if
(
navigator
.
xr
)
{
if
(
navigator
.
xr
)
{
...
...
public/assets/images/charlotte.jpg
deleted
100644 → 0
View file @
0333f048
30.8 KB
public/assets/images/gengenbach.png
0 → 100644
View file @
ea7f3be7
1.89 MB
public/style.css
View file @
ea7f3be7
...
@@ -7,8 +7,7 @@ body {
...
@@ -7,8 +7,7 @@ body {
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
height
:
100vh
;
height
:
100vh
;
background-image
:
url('https://www.hft-stuttgart.de/fileadmin/Dateien/Hochschule/-_R_Juergen_Pollak_HFT_18.04.18-0091.jpg')
;
background-image
:
url('assets/images/gengenbach.png')
;
background-size
:
cover
;
background-size
:
cover
;
background-position
:
center
;
background-position
:
center
;
}
}
...
@@ -35,7 +34,6 @@ p {
...
@@ -35,7 +34,6 @@ p {
#add-menu
{
#add-menu
{
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
#menu-bar
,
#menu-bar
,
...
@@ -98,7 +96,69 @@ button:active {
...
@@ -98,7 +96,69 @@ button:active {
background-color
:
#387a39
;
background-color
:
#387a39
;
}
}
/* Confirmation Dialog */
/* ============================================================
START SCREEN BUTTONS
============================================================ */
.start-screen-button
{
position
:
fixed
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
padding
:
15px
;
font-size
:
18px
;
}
.start-ar-button
{
top
:
45%
;
background-color
:
#4CAF50
;
color
:
white
;
}
.load-scene-button
{
top
:
55%
;
}
.predefined-scene-button-1
{
top
:
65%
;
}
.predefined-scene-button-2
{
top
:
75%
;
}
/* ============================================================
SCENE SELECTION COLORS
============================================================ */
/* Scene buttons are gray when no scene is selected */
.scene-button
{
background-color
:
#808080
;
color
:
white
;
}
/* Gray hover */
.scene-button
:hover
{
background-color
:
#707070
;
}
/* Selected scene becomes green */
.scene-button.selected
{
background-color
:
#4CAF50
;
color
:
white
;
}
/* Selected scene hover */
.scene-button.selected
:hover
{
background-color
:
#45a049
;
}
/* ============================================================
CONFIRMATION DIALOG
============================================================ */
#confirmation-dialog
,
#confirmation-dialog
,
#delete-confirmation-dialog
{
#delete-confirmation-dialog
{
position
:
fixed
;
position
:
fixed
;
...
@@ -168,6 +228,10 @@ button:active {
...
@@ -168,6 +228,10 @@ button:active {
}
}
/* ============================================================
DYNAMIC MENU
============================================================ */
#dynamic-menu
{
#dynamic-menu
{
position
:
absolute
;
position
:
absolute
;
bottom
:
90px
;
bottom
:
90px
;
...
@@ -186,7 +250,6 @@ button:active {
...
@@ -186,7 +250,6 @@ button:active {
border-radius
:
8px
;
border-radius
:
8px
;
}
}
#dynamic-menu
input
[
type
=
"range"
]
{
#dynamic-menu
input
[
type
=
"range"
]
{
width
:
100%
;
width
:
100%
;
margin
:
10px
auto
;
margin
:
10px
auto
;
...
@@ -205,6 +268,11 @@ button:active {
...
@@ -205,6 +268,11 @@ button:active {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
/* ============================================================
DEBUG CONSOLE
============================================================ */
#debug-container
{
#debug-container
{
position
:
fixed
;
position
:
fixed
;
top
:
0
;
top
:
0
;
...
@@ -239,7 +307,10 @@ button:active {
...
@@ -239,7 +307,10 @@ button:active {
}
}
/* Style für Move Menu */
/* ============================================================
MOVE MENU
============================================================ */
.button-row
{
.button-row
{
display
:
flex
;
display
:
flex
;
gap
:
15px
;
gap
:
15px
;
...
@@ -266,6 +337,8 @@ button:active {
...
@@ -266,6 +337,8 @@ button:active {
background-color
:
#0056b3
;
background-color
:
#0056b3
;
transform
:
scale
(
0.95
);
transform
:
scale
(
0.95
);
}
}
/* ============================================================
/* ============================================================
MAP WINDOW
MAP WINDOW
============================================================ */
============================================================ */
...
@@ -303,4 +376,4 @@ button:active {
...
@@ -303,4 +376,4 @@ button:active {
#map-container
.leaflet-container
{
#map-container
.leaflet-container
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
\ No newline at end of file
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