-
Notifications
You must be signed in to change notification settings - Fork 0
/
14-Controller.html
30 lines (30 loc) · 1.15 KB
/
14-Controller.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kendali</title>
<!-- Baik yang 3-DoF: Oculus Go; maupun yang 6-DoF: Oculus Quest -->
<!-- Untuk mengakomodasi beragam kendali: Laser, Hands, Super-hands -->
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.1/dist/aframe-extras.min.js"></script>
<script src="https://unpkg.com/super-hands@3.0.0/dist/super-hands.min.js"></script>
</head>
<body>
<a-scene>
<!-- Baru terlihat setelah kita aktifkan mode VR -->
<a-entity laser-controls="hand:right;color:red;"></a-entity>
<!-- <a-entity
sphere-collider="objects:a-box;"
super-hands hand-controls="hand:right;color:red;"></a-entity> -->
<a-box
grabbable
id="box"
scale="0.5 0.5 0.5"
color="blue"
position="0 1.5 -1"
animation="property:rotation;from:0 0 0;to: 360 360 0;startEvents:click;"
></a-box>
</a-scene>
</body>
</html>