Explorar o código

Fixed VRControls.

Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
5138a34129
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      examples/js/controls/VRControls.js

+ 6 - 4
examples/js/controls/VRControls.js

@@ -77,13 +77,15 @@ THREE.VRControls = function ( object, callback ) {
 
 			var vrInput = vrInputs[ i ];
 
-		if ( vrInput.resetSensor !== undefined ) {
+			if ( vrInput.resetSensor !== undefined ) {
 
-			vrInput.resetSensor();
+				vrInput.resetSensor();
 
-		} else if ( vrInput.zeroSensor !== undefined ) {
+			} else if ( vrInput.zeroSensor !== undefined ) {
 
-			vrInput.zeroSensor();
+				vrInput.zeroSensor();
+
+			}
 
 		}