Browse Source

fix VRControls onError

Jeffrey Zitelli 9 years ago
parent
commit
1e99bc4578
1 changed files with 5 additions and 1 deletions
  1. 5 1
      examples/js/controls/VRControls.js

+ 5 - 1
examples/js/controls/VRControls.js

@@ -21,7 +21,11 @@ THREE.VRControls = function ( object, onError ) {
 
 		}
 
-		if ( onError ) onError( 'HMD not available' );
+		if ( vrInputs.length === 0 ) {
+
+			if ( onError ) onError( 'PositionSensorVRDevice not available' );
+
+		}
 
 	}