Skip to content

Commit

Permalink
Merge pull request #260 from mozilla/bug/hand-pose-equality-check-rev…
Browse files Browse the repository at this point in the history
…ersed

Fix the check to see if the pose is the same as last time.
  • Loading branch information
brianpeiris authored Apr 24, 2018
2 parents 228b46d + 17fcf61 commit aaf8eab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/hand-poses.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ AFRAME.registerComponent("hand-pose", {
if (
!this.networkedAvatar ||
!this.networkedAvatar.data ||
!this.networkedAvatar.data[`${this.id}_hand_pose`] !== this.pose
)
this.networkedAvatar.data[`${this.id}_hand_pose`] === this.pose
) {
return;
}

this.animatePose(NETWORK_POSES[this.pose], NETWORK_POSES[this.networkedAvatar.data[`${this.id}_hand_pose`]]);
this.pose = this.networkedAvatar.data[`${this.id}_hand_pose`];
Expand Down

0 comments on commit aaf8eab

Please sign in to comment.