Skip to content

Commit fff8f99

Browse files
committed
update readme and builds for release
1 parent 6b80c65 commit fff8f99

File tree

4 files changed

+111
-111
lines changed

4 files changed

+111
-111
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ The [examples page](https://wmurphyrd.github.io/aframe-super-hands-component/exa
117117

118118
## News
119119

120+
v3.0.2
121+
* A-Frame 1.3.0 support confirmation
122+
* Updated dependencies and fixed tests and examples
123+
* No API changes
124+
120125
v3.0.1
121126

122127
* A-Frame 1.0.4 support confirmation
@@ -169,9 +174,9 @@ for any device: desktop, mobile ("magic window"), cardboard viewer + button,
169174

170175
| super-hands Version | A-Frame Version | aframe-extras Version | aframe-physics-system Version |
171176
| --- | --- | --- | --- |
177+
| ^v3.0.2 | ^v1.3.0 | ^v6.1.1 | github:n5ro/aframe-physics-system#59100ac8 (last npm version cannot be installed) |
172178
| ^v3.0.1 | ^v1.0.4 | ^v6.1.1 | ^v4.0.1 |
173179
| v3.0.0 | ^v0.8.2 | ^v4.1.2 | ^v3.1.2 |
174-
| ^v2.0.0 | v0.6.x | ^v3.11.4 | ^v2.0.0 |
175180

176181
## Core Component
177182

dist/super-hands.js

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ AFRAME.registerComponent('super-hands', {
381381

382382
/* search collided entities for target to hover/dragover */
383383
hover: function () {
384-
var hvrevt, hoverEl; // end previous hover
384+
let hvrevt, hoverEl; // end previous hover
385385

386386
if (this.state.has(this.HOVER_EVENT)) {
387387
this._unHover(this.state.get(this.HOVER_EVENT), true);
@@ -476,7 +476,7 @@ AFRAME.registerComponent('super-hands', {
476476
}
477477
},
478478
_unWatch: function (target) {
479-
var hoverIndex = this.hoverEls.indexOf(target);
479+
const hoverIndex = this.hoverEls.indexOf(target);
480480

481481
if (hoverIndex !== -1) {
482482
this.hoverEls.splice(hoverIndex, 1);
@@ -545,19 +545,18 @@ AFRAME.registerComponent('super-hands', {
545545
});
546546
},
547547
emitCancelable: function (target, name, detail) {
548-
var data, evt;
549548
detail = detail || {};
550-
data = {
549+
const data = {
551550
bubbles: true,
552551
cancelable: true,
553552
detail: detail
554553
};
555554
data.detail.target = data.detail.target || target;
556-
evt = new window.CustomEvent(name, data);
555+
const evt = new window.CustomEvent(name, data);
557556
return target.dispatchEvent(evt);
558557
},
559558
dispatchMouseEvent: function (target, name, relatedTarget) {
560-
var mEvt = new window.MouseEvent(name, {
559+
const mEvt = new window.MouseEvent(name, {
561560
relatedTarget: relatedTarget
562561
});
563562
target.dispatchEvent(mEvt);
@@ -581,8 +580,8 @@ AFRAME.registerComponent('super-hands', {
581580
}
582581
},
583582
findTarget: function (evType, detail, filterUsed) {
584-
var elIndex;
585-
var eligibleEls = this.hoverEls;
583+
let elIndex;
584+
let eligibleEls = this.hoverEls;
586585

587586
if (filterUsed) {
588587
eligibleEls = eligibleEls.filter(el => el !== this.state.get(this.GRAB_EVENT) && el !== this.state.get(this.DRAG_EVENT) && el !== this.state.get(this.STRETCH_EVENT));
@@ -599,7 +598,7 @@ AFRAME.registerComponent('super-hands', {
599598
// Helper to ensure dropping and regrabbing finds the same target for
600599
// for order-sorted hoverEls (grabbing; no-op for distance-sorted (pointing)
601600
promoteHoveredEl: function (el) {
602-
var hoverIndex = this.hoverEls.indexOf(el);
601+
const hoverIndex = this.hoverEls.indexOf(el);
603602

604603
if (hoverIndex !== -1 && this.hoverElsIntersections[hoverIndex].distance == null) {
605604
this.hoverEls.splice(hoverIndex, 1);
@@ -887,7 +886,7 @@ AFRAME.registerComponent('droppable', {
887886
return true;
888887
}
889888

890-
for (let item of acceptableEntities) {
889+
for (const item of acceptableEntities) {
891890
if (item === entity) {
892891
return true;
893892
}
@@ -1006,10 +1005,10 @@ AFRAME.registerComponent('grabbable', inherit(base, {
10061005
this.yFactor = (this.data.invert ? -1 : 1) * !this.data.suppressY;
10071006
},
10081007
tick: function () {
1009-
var q = new THREE.Quaternion();
1010-
var v = new THREE.Vector3();
1008+
const q = new THREE.Quaternion();
1009+
const v = new THREE.Vector3();
10111010
return function () {
1012-
var entityPosition;
1011+
let entityPosition;
10131012

10141013
if (this.grabber) {
10151014
// reflect on z-axis to point in same direction as the laser
@@ -1091,16 +1090,14 @@ AFRAME.registerComponent('grabbable', inherit(base, {
10911090
}
10921091
},
10931092
resetGrabber: function () {
1094-
var objPos = new THREE.Vector3();
1095-
var grabPos = new THREE.Vector3();
1093+
const objPos = new THREE.Vector3();
1094+
const grabPos = new THREE.Vector3();
10961095
return function () {
1097-
let raycaster;
1098-
10991096
if (!this.grabber) {
11001097
return false;
11011098
}
11021099

1103-
raycaster = this.grabber.getAttribute('raycaster');
1100+
const raycaster = this.grabber.getAttribute('raycaster');
11041101
this.deltaPositionIsValid = false;
11051102
this.grabDistance = this.el.object3D.getWorldPosition(objPos).distanceTo(this.grabber.object3D.getWorldPosition(grabPos));
11061103

@@ -1113,7 +1110,7 @@ AFRAME.registerComponent('grabbable', inherit(base, {
11131110
};
11141111
}(),
11151112
lostGrabber: function (evt) {
1116-
let i = this.grabbers.indexOf(evt.relatedTarget); // if a queued, non-physics grabber leaves the collision zone, forget it
1113+
const i = this.grabbers.indexOf(evt.relatedTarget); // if a queued, non-physics grabber leaves the collision zone, forget it
11171114

11181115
if (i !== -1 && evt.relatedTarget !== this.grabber && !this.physicsIsConstrained(evt.relatedTarget)) {
11191116
this.grabbers.splice(i, 1);
@@ -1160,7 +1157,7 @@ AFRAME.registerComponent('hoverable', {
11601157
return;
11611158
}
11621159

1163-
var handIndex = this.hoverers.indexOf(evt.detail.hand);
1160+
const handIndex = this.hoverers.indexOf(evt.detail.hand);
11641161

11651162
if (handIndex !== -1) {
11661163
this.hoverers.splice(handIndex, 1);
@@ -1191,10 +1188,10 @@ module.exports = function () {
11911188
}
11921189
},
11931190
startButtonOk: function (evt) {
1194-
return buttonIsValid(evt, this.data['startButtons']);
1191+
return buttonIsValid(evt, this.data.startButtons);
11951192
},
11961193
endButtonOk: function (evt) {
1197-
return buttonIsValid(evt, this.data['endButtons']);
1194+
return buttonIsValid(evt, this.data.endButtons);
11981195
}
11991196
};
12001197
}();
@@ -1239,7 +1236,7 @@ module.exports = {
12391236
return false;
12401237
},
12411238
physicsEnd: function (evt) {
1242-
let constraintId = this.constraints.get(evt.detail.hand);
1239+
const constraintId = this.constraints.get(evt.detail.hand);
12431240

12441241
if (constraintId) {
12451242
this.el.removeAttribute('constraint__' + constraintId);
@@ -1248,7 +1245,7 @@ module.exports = {
12481245
},
12491246
physicsClear: function () {
12501247
if (this.el.body) {
1251-
for (let c of this.constraints.values()) {
1248+
for (const c of this.constraints.values()) {
12521249
this.el.body.world.removeConstraint(c);
12531250
}
12541251
}
@@ -1356,7 +1353,7 @@ AFRAME.registerComponent('stretchable', inherit(base, {
13561353

13571354
},
13581355
end: function (evt) {
1359-
var stretcherIndex = this.stretchers.indexOf(evt.detail.hand);
1356+
const stretcherIndex = this.stretchers.indexOf(evt.detail.hand);
13601357

13611358
if (evt.defaultPrevented || !this.endButtonOk(evt)) {
13621359
return;
@@ -1393,7 +1390,7 @@ AFRAME.registerComponent('stretchable', inherit(base, {
13931390
return;
13941391
}
13951392

1396-
for (let c of this.el.childNodes) {
1393+
for (const c of this.el.childNodes) {
13971394
this.stretchBody(c, deltaStretch);
13981395
}
13991396

@@ -1448,7 +1445,7 @@ AFRAME.registerSystem('super-hands', {
14481445
this.superHands.push(comp);
14491446
},
14501447
unregisterMe: function (comp) {
1451-
var index = this.superHands.indexOf(comp);
1448+
const index = this.superHands.indexOf(comp);
14521449

14531450
if (index !== -1) {
14541451
this.superHands.splice(index, 1);

0 commit comments

Comments
 (0)