Browse Source

Axes added to vive thumbpad event

servin nissen 8 năm trước cách đây
mục cha
commit
f5ae8437ed
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/js/vr/ViveController.js

+ 1 - 1
examples/js/vr/ViveController.js

@@ -89,7 +89,7 @@ THREE.ViveController = function ( id ) {
 			if ( thumbpadIsPressed !== gamepad.buttons[ 0 ].pressed ) {
 
 				thumbpadIsPressed = gamepad.buttons[ 0 ].pressed;
-				scope.dispatchEvent( { type: thumbpadIsPressed ? 'thumbpaddown' : 'thumbpadup' } );
+				scope.dispatchEvent( { type: thumbpadIsPressed ? 'thumbpaddown' : 'thumbpadup', axes: axes } );
 
 			}