-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
65 lines (64 loc) · 1.85 KB
/
Copy pathindex.html
File metadata and controls
65 lines (64 loc) · 1.85 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<title>HoloCare AR Test</title>
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<script>
window.addEventListener('touchstart', () => {
const modelViewer = document.getElementById('model-viewer');
console.log("model-viewer can activate AR: " + modelViewer.canActivateAR);
modelViewer.activateAR();
})
</script>
</head>
<body>
<style>
html {
background-color: black;
}
#container {
display: flex;
flex-direction: column;
width: 100%;
height: 95vh;
flex: 1;
flex-grow: 1;
}
.poster {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-image: url('./Scenes/LiverScene.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
</style>
<div id="container">
<!--<model-viewer
style="flex: 1; width: 100%"
alt="Liver scene"
src="./Scenes/LiverScene.glb" ar autoplay
ios-src="./Scenes/LiverScene.usdz"
ar-modes="webxr scene-viewer quick-look"
skybox-image="./Scenes/skybox.jpg"
seamless-poster shadow-intensity="0.5"
camera-controls enable-pan>
<div class="poster" slot="poster"></div>
</model-viewer>-->
<model-viewer
id="model-viewer"
style="flex: 1; width: 100%"
alt="Liver scene"
src="./Scenes/LiverScene.glb" ar
ios-src="./Scenes/LiverScene2.reality"
ar-modes="webxr scene-viewer quick-look"
seamless-poster shadow-intensity="0.5"
camera-controls enable-pan>
<div class="poster" slot="poster"></div>
</model-viewer>
</div>
</body>
</html>