소스 검색

DaydreamController: Fixed null check.

Mr.doob 8 년 전
부모
커밋
c4eef2e2fe
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      examples/js/vr/DaydreamController.js

+ 2 - 2
examples/js/vr/DaydreamController.js

@@ -53,10 +53,10 @@ THREE.DaydreamController = function () {
 
 		if ( gamepad !== undefined && gamepad.pose !== undefined ) {
 
-			if ( pose === null ) return; // no user action yet
-
 			var pose = gamepad.pose;
 
+			if ( pose === null ) return; // no user action yet
+
 			//  orientation
 
 			if ( pose.orientation !== null ) scope.quaternion.fromArray( pose.orientation );