forked from jgbarah/aframe-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grab-ar.html
41 lines (38 loc) · 1.69 KB
/
grab-ar.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
<!DOCTYPE html>
<html>
<head>
<title>Tests for grabbing an object</title>
<script src="https://aframe.io/releases/1.4.1/aframe.min.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.misc.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@67d1130/dist/aframe-extras.js"></script>
<!-- <script src="https://unpkg.com/super-hands@^3.0.3/dist/super-hands.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-super-hands-component@7d95eef/dist/super-hands.js"></script>
</head>
<body>
<a-scene>
<a-assets timeout="5000">
<a-asset-item id="sculpture" src="sculpture.glb"></a-asset-item>
</a-assets>
<a-entity class="object"
geometry="primitive: box; width: 0.2; height: 0.02; depth: 0.02"
position="0 1.5 -0.5" rotation="0 0 0"
material="color: #4CC3D9; transparent: true; opacity: 0.5"
hoverable grabbable stretchable draggable dropppable>
<a-entity
geometry="primitive: box; width: 0.3; height: 0.3; depth: 0.3"
position="0.3 0 0" rotation="0 45 0" material="color: red">
</a-entity>
</a-entity>
<a-entity position="0 0 0" movement-controls="fly: false"
wasd-controls="acceleration: 10; fly: false">
<a-entity sphere-collider="objects: .object"
super-hands hand-controls="hand: left">
</a-entity>
<a-entity sphere-collider="objects: .object"
super-hands hand-controls="hand: right">
</a-entity>
<a-entity camera position="0 1.6 0" look-controls></a-entity>
</a-entity>
</a-scene>
</body>
</html>