Browse Source

Remove check for SamsungChangeSky from GearVRController.js

And put this into the example
servin nissen 8 years ago
parent
commit
71bca47298
2 changed files with 7 additions and 6 deletions
  1. 1 5
      examples/js/vr/GearVRController.js
  2. 6 1
      examples/webvr_gear_vr.html

+ 1 - 5
examples/js/vr/GearVRController.js

@@ -34,11 +34,7 @@ THREE.GearVRController = function () {
 
 	this.setSkyBox = function ( skyBox ) {
 
-		if ( 'SamsungChangeSky' in window ) {
-
-			window.SamsungChangeSky( skyBox );
-
-		}
+		window.SamsungChangeSky( skyBox );
 
 	};
 

+ 6 - 1
examples/webvr_gear_vr.html

@@ -133,7 +133,12 @@
 					up: 'textures/gear_vr_skybox/A.jpg',
 					down: 'textures/gear_vr_skybox/F.jpg'
 				};
-				controller.setSkyBox( skyBox );
+
+				if ( 'SamsungChangeSky' in window ) {
+
+					controller.setSkyBox( skyBox );
+
+				}
 
 				var MTL = new THREE.MTLLoader();