소스 검색

Merge pull request #8023 from jzitelli/pr/VRControlsOnError

fix VRControls onError
Mr.doob 9 년 전
부모
커밋
2b3e94a471
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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' );
+
+		}
 
 	}