Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #27 from chenzlabs/ar-raycaster-pass-in-xy
Browse files Browse the repository at this point in the history
AR raycaster pass in xy
  • Loading branch information
machenmusik authored Mar 23, 2018
2 parents 1b8d1c5 + 3e048e7 commit 868ee9c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
8 changes: 7 additions & 1 deletion dist/aframe-ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,13 @@
hitAR: function () {
var whichar = this.checkWhichAR();
if (!whichar || !whichar.arDisplay) { return []; }
return whichar.hitAR(this.data.x, this.data.y, this.data.el, this.el);
var x = this.data.x;
var y = this.data.y;
if (arguments.length >= 2) {
x = arguments[0];
y = arguments[1];
}
return whichar.hitAR(x, y, this.data.el, this.el);
},

checkWhichAR: function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/aframe-ar.min.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion dist/aframe-three-ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,13 @@
hitAR: function () {
var whichar = this.checkWhichAR();
if (!whichar || !whichar.arDisplay) { return []; }
return whichar.hitAR(this.data.x, this.data.y, this.data.el, this.el);
var x = this.data.x;
var y = this.data.y;
if (arguments.length >= 2) {
x = arguments[0];
y = arguments[1];
}
return whichar.hitAR(x, y, this.data.el, this.el);
},

checkWhichAR: function () {
Expand Down
8 changes: 7 additions & 1 deletion src/ar-raycaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ AFRAME.registerComponent('ar-raycaster', {
hitAR: function () {
var whichar = this.checkWhichAR();
if (!whichar || !whichar.arDisplay) { return []; }
return whichar.hitAR(this.data.x, this.data.y, this.data.el, this.el);
var x = this.data.x;
var y = this.data.y;
if (arguments.length >= 2) {
x = arguments[0];
y = arguments[1];
}
return whichar.hitAR(x, y, this.data.el, this.el);
},

checkWhichAR: function () {
Expand Down

0 comments on commit 868ee9c

Please sign in to comment.