Skip to content

Commit 9a63a23

Browse files
authored
add instanceId to Object3D.userData if available (#241)
* update debs * add instanceId to Object3D userData * check on dist * remove aframe-machinima-testing and update debs
1 parent 7d95eef commit 9a63a23

File tree

3 files changed

+8133
-6879
lines changed

3 files changed

+8133
-6879
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ AFRAME.registerComponent('super-hands', {
288288
const hoverEls = this.hoverEls
289289
const hitElIndex = this.hoverEls.indexOf(hitEl)
290290
let hoverNeedsUpdate = false
291+
if (dist && intersection.instanceId !== undefined)
292+
hitEl.object3D.userData = { instanceId: intersection.instanceId };
291293
if (hitElIndex === -1) {
292294
hoverNeedsUpdate = true
293295
// insert in order of distance when available

0 commit comments

Comments
 (0)