浏览代码

Remove check for SamsungChangeSky from GearVRController.js

And put this into the example
servin nissen 8 年之前
父节点
当前提交
71bca47298
共有 2 个文件被更改,包括 7 次插入6 次删除
  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();