Skip to content

Commit 96ceb92

Browse files
Add instruction to use superhands with aframe 1.5.0 and onward (#244)
1 parent 9a63a23 commit 96ceb92

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,35 @@ Install and use by directly by including the [browser files](dist):
7575
</body>
7676
```
7777

78+
To use with A-Frame 1.5.0 and onward:
79+
80+
```html
81+
<head>
82+
<title>Most Basic Super-Hands Example</title>
83+
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
84+
<script>
85+
delete AFRAME.components["grabbable"];
86+
</script>
87+
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.misc.min.js"></script>
88+
<script src="https://unpkg.com/super-hands@^3.0.3/dist/super-hands.min.js"></script>
89+
</head>
90+
91+
<body>
92+
<a-scene>
93+
<a-assets></a-assets>
94+
<a-entity>
95+
<a-camera></a-camera>
96+
<a-entity sphere-collider="objects: a-box" super-hands hand-controls="hand: left"></a-entity>
97+
<a-entity sphere-collider="objects: a-box" super-hands hand-controls="hand: right"></a-entity>
98+
</a-entity>
99+
<!-- hover & drag-drop won't have any obvious effect without some additional event handlers or components. See the examples page for more -->
100+
<a-box hoverable grabbable stretchable draggable droppable color="blue" position="0 0 -1"></a-box>
101+
</a-scene>
102+
</body>
103+
```
104+
105+
Note: This is a workaround solution to resolve the conflict between A-Frame grabbable component (introduced in A-Frame 1.5.0) and Superhands grabbable component.
106+
78107
#### npm
79108

80109
Install via npm:

0 commit comments

Comments
 (0)