-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (38 loc) · 1.96 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
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video 360 - Hand Tracking - A-Frame</title>
<script src="js/aframe-master.js"></script>
<script src="js/aframe/hand-tracking-mesh.js"></script>
<script src="js/aframe/hand-tracking-gestures-mesh.js"></script>
</head>
<body>
<a-scene webxr="optionalFeatures: hand-tracking">
<a-assets>
<a-asset-item id="room" src="/models/Bake03.glb"></a-asset-item>
<a-asset-item id="earth" src="/models/Earth.glb"></a-asset-item>
<a-asset-item id="moon" src="/models/moon.glb"></a-asset-item>
<video id="web360" autoplay="true" loop="true" crossorigin="anonymous" playsinline webkit-playsinline
src="https://cdn.glitch.com/843fbb02-ea2d-45b2-bbd4-6bbecece2b3e%2FSan%20Marcos%20de%20Tarrazu%CC%81.mp4?v=1585324950744">
</a-assets>
<a-entity class="hand" hand-tracking-mesh="hand: left" hand-tracking-gestures-mesh></a-entity>
<a-entity class="hand" hand-tracking-mesh="hand: right" hand-tracking-gestures-mesh></a-entity>
<a-entity position="0 -1 0" scale="1 1 1" rotation="0 0 0" gltf-model="#room" animation-mixer></a-entity>
<a-entity position="0 -1 0" scale="1 1 1" rotation="0 0 0" gltf-model="#earth" animation-mixer></a-entity>
<a-entity position="0 -1 0" scale="1 1 1" rotation="0 0 0" gltf-model="#moon" animation-mixer></a-entity>
<a-sky rotation="0 180 0" src="#web360">
<script>
var videoEl = document.querySelector('#web360');
videoEl.currentTime = 0.1; // Seek to 0 seconds.
videoEl.pause();
window.addEventListener('click', function () {
var v = document.querySelector('#web360');
v.play();
});
</script>
</a-sky>
</a-scene>
</body>
</html>