-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
42 lines (37 loc) · 1.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Model Showcase</title>
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<script type="module">
import '@google/model-viewer/dist/model-viewer-legacy.js';
</script>
<script>
if (!('WebGL2RenderingContext' in window)) {
alert("Your browser does not support WebGL 2, which is required to view this model.");
}
</script>
<style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(180deg, #343b52, #10121a);
font-family: Arial, sans-serif;
}
model-viewer {
width: 100%;
height: 90%;
}
</style>
</head>
<body>
<model-viewer src="./birthdaycake.glb" auto-rotate camera-controls
environment-image="./moonless_golf_2k.hdr"
shadow-intensity="1.5" alt="3D model"></model-viewer>
</body>
</html>