Explorar el Código

fix VRControls onError

Jeffrey Zitelli hace 9 años
padre
commit
1e99bc4578
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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' );
+
+		}
 
 	}