Przeglądaj źródła

VREffect style fixes

Brandon Jones 9 lat temu
rodzic
commit
ecc10c4371
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      examples/js/effects/VREffect.js

+ 5 - 3
examples/js/effects/VREffect.js

@@ -92,15 +92,19 @@ THREE.VREffect = function ( renderer, onError ) {
 
 	this.setFullScreen = function ( boolean ) {
 
-		return new Promise(function(resolve, reject) {
+		return new Promise( function ( resolve, reject ) {
 
 			if ( vrHMD === undefined ) {
+
 				reject( new Error( 'No VR hardware found.' ) );
 				return;
+
 			}
 			if ( isPresenting === boolean ) {
+
 				resolve();
 				return;
+
 			}
 
 			if ( !deprecatedAPI ) {
@@ -115,8 +119,6 @@ THREE.VREffect = function ( renderer, onError ) {
 
 				}
 
-				return;
-
 			} else {
 
 				if ( canvas.mozRequestFullScreen ) {