Explorar o código

DaydreamController: Fixed null check.

Mr.doob %!s(int64=8) %!d(string=hai) anos
pai
achega
c4eef2e2fe
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 );