Ver Fonte

fix VRControls onError

Jeffrey Zitelli há 9 anos atrás
pai
commit
1e99bc4578
1 ficheiros alterados com 5 adições e 1 exclusões
  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' );
+
+		}
 
 
 	}
 	}