Skip to content

Commit

Permalink
prevent bug when none handed input is present in immersive-hands example
Browse files Browse the repository at this point in the history
  • Loading branch information
AdaRoseCannon authored and toji committed Jun 11, 2024
1 parent 98a0538 commit 6d43438
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions immersive-hands.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@
// Boxes
let boxes_left = [];
let boxes_right = [];
let boxes_none = [];
let tracked_boxes_left = [];
let tracked_boxes_right = [];
let boxes = { input_left: boxes_left, input_right: boxes_right, tracked_left: tracked_boxes_left, tracked_right: tracked_boxes_right };
let tracked_boxes_none = [];
let boxes = { input_left: boxes_left, input_right: boxes_right, input_none: boxes_none, tracked_left: tracked_boxes_left, tracked_right: tracked_boxes_right, tracked_none: tracked_boxes_none };
let indexFingerBoxes = { input_left: null, input_right: null, tracked_left: null, tracked_right: null };
const defaultBoxColor = {r: 0.5, g: 0.5, b: 0.5};
const leftBoxColor = {r: 1, g: 0, b: 1};
Expand Down Expand Up @@ -123,7 +125,7 @@
}
boxes_left = [];
boxes_right = [];
boxes = { input_left: boxes_left, input_right: boxes_right, tracked_left: tracked_boxes_left, tracked_right: tracked_boxes_right };
boxes = { input_left: boxes_left, input_right: boxes_right, input_none: boxes_none, tracked_left: tracked_boxes_left, tracked_right: tracked_boxes_right, tracked_none: tracked_boxes_none };
if (typeof XRHand !== 'undefined') {
for (let i = 0; i <= 24; i++) {
const r = .6 + Math.random() * .4;
Expand Down

0 comments on commit 6d43438

Please sign in to comment.