Преглед на файлове

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 );