-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
28 lines (28 loc) · 1.11 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
<script src="https://rawgit.com/feiss/aframe-environment-component/master/dist/aframe-environment-component.min.js"></script>
<title>Totoro VR</title>
</head>
<body>
<a-scene>
<a-camera>
<a-text id="score" value="Score" position="-0.5 0.5 -0.8" color="salmon"></a-text>
<a-cursor color="white"></a-cursor>
</a-camera>
<a-entity environment="preset: japan"></a-entity>
</a-scene>
<a-entity
id="totoro"
gltf-model="scene.gltf" position="0 0 -5" scale="0.1 0.1 0.1"
animation="property: rotation; to: 0 360 0; loop: true; dur: 2000"
animation__collect="property: position; to: 0 0 0; dur: 1000; startEvents: collect"
animation__shrink="property: scale; to: 0 0 0; dur: 1000; startEvents: collect"
></a-entity>
<script src="game.js"></script>
</body>
</html>