Browse Source

Merge pull request #19929 from Mugen87/dev46

WebXRController: Fix linter warnings.
Mr.doob 5 years ago
parent
commit
a843d6e41c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/renderers/webxr/WebXRController.js

+ 4 - 4
src/renderers/webxr/WebXRController.js

@@ -29,7 +29,7 @@ Object.assign( WebXRController.prototype, {
 
 			if ( window.XRHand ) {
 
-				for ( let i = 0; i <= XRHand.LITTLE_PHALANX_TIP; i ++ ) {
+				for ( let i = 0; i <= window.XRHand.LITTLE_PHALANX_TIP; i ++ ) {
 
 					// The transform of this joint will be updated with the joint pose on each frame
 					let joint = new Group();
@@ -142,7 +142,7 @@ Object.assign( WebXRController.prototype, {
 			if ( inputSource.hand ) {
 
 				handPose = true;
-				for ( let i = 0; i <= XRHand.LITTLE_PHALANX_TIP; i ++ ) {
+				for ( let i = 0; i <= window.XRHand.LITTLE_PHALANX_TIP; i ++ ) {
 
 					if ( inputSource.hand[ i ] ) {
 
@@ -163,8 +163,8 @@ Object.assign( WebXRController.prototype, {
 						// Custom events
 
 						// Check pinch
-						const indexTip = hand.joints[ XRHand.INDEX_PHALANX_TIP ];
-						const thumbTip = hand.joints[ XRHand.THUMB_PHALANX_TIP ];
+						const indexTip = hand.joints[ window.XRHand.INDEX_PHALANX_TIP ];
+						const thumbTip = hand.joints[ window.XRHand.THUMB_PHALANX_TIP ];
 						const distance = indexTip.position.distanceTo( thumbTip.position );
 
 						const distanceToPinch = 0.02;