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
f5646047
Commit
f5646047
authored
Dec 09, 2024
by
Percen
Browse files
Update public/index.html
parent
89eca18a
Changes
1
Show whitespace changes
Inline
Side-by-side
public/index.html
View file @
f5646047
<!doctype html>
<!doctype html>
<html>
<html
lang=
"de"
>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<title>
GeoVis AR Projekt
</title>
<title>
GeoVis AR Projekt
</title>
<!-- three.js -->
<style>
<script
src=
"https://unpkg.com/three@0.126.0/build/three.js"
></script>
body
{
<script
src=
"https://unpkg.com/three@0.126.0/examples/js/loaders/GLTFLoader.js"
></script>
margin
:
0
;
font-family
:
Arial
,
sans-serif
;
background-color
:
#f0f0f0
;
color
:
#333
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100vh
;
background-image
:
url('https://www.w3schools.com/w3images/forest.jpg')
;
background-size
:
cover
;
background-position
:
center
;
}
.container
{
text-align
:
center
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
padding
:
50px
;
border-radius
:
10px
;
color
:
white
;
max-width
:
80%
;
box-shadow
:
0px
0px
15px
rgba
(
0
,
0
,
0
,
0.5
);
}
h1
{
font-size
:
3em
;
margin-bottom
:
20px
;
}
p
{
font-size
:
1.2em
;
margin-bottom
:
30px
;
}
button
{
background-color
:
#4CAF50
;
color
:
white
;
font-size
:
1.5em
;
padding
:
15px
30px
;
border
:
none
;
border-radius
:
5px
;
cursor
:
pointer
;
transition
:
background-color
0.3s
;
}
button
:hover
{
background-color
:
#45a049
;
}
button
:active
{
background-color
:
#387a39
;
}
.footer
{
position
:
fixed
;
bottom
:
20px
;
font-size
:
0.9em
;
color
:
white
;
}
</style>
</head>
</head>
<body>
<body>
<button
id=
"startButton"
onclick=
"activateXR()"
>
Start city planning
</button>
<div
class=
"container"
>
<h1>
GeoVis AR Projekt
</h1>
<p>
Gestalten Sie Ihre Stadt in Augmented Reality mit interaktiven Stadtmöbeln!
</p>
<button
onclick=
"activateXR()"
>
Start City Planning
</button>
</div>
<script
>
<div
class=
"footer"
>
async
function
activateXR
()
{
<p>
©
2024 GeoVis AR | Alle Rechte vorbehalten
</p>
document
.
getElementById
(
"
startButton
"
).
style
.
display
=
"
none
"
;
// Start-Button verstecken
</div>
<script>
async
function
activateXR
()
{
// Hier können Sie die Funktion für das AR-Projekt aktivieren
document
.
querySelector
(
'
.container
'
).
style
.
display
=
'
none
'
;
// Startseite ausblenden
const
canvas
=
document
.
createElement
(
"
canvas
"
);
const
canvas
=
document
.
createElement
(
"
canvas
"
);
document
.
body
.
appendChild
(
canvas
);
document
.
body
.
appendChild
(
canvas
);
const
gl
=
canvas
.
getContext
(
"
webgl
"
,
{
xrCompatible
:
true
});
const
gl
=
canvas
.
getContext
(
"
webgl
"
,
{
xrCompatible
:
true
});
...
@@ -95,7 +163,8 @@ async function activateXR() {
...
@@ -95,7 +163,8 @@ async function activateXR() {
}
}
};
};
session
.
requestAnimationFrame
(
onXRFrame
);
session
.
requestAnimationFrame
(
onXRFrame
);
}
}
</script>
</script>
</body>
</body>
</html>
</html>
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