Sfoglia il codice sorgente

DeviceOrientationControls: Calling connect() by default.

Mr.doob 11 anni fa
parent
commit
6d41888106

+ 0 - 1
examples/css3d_panorama_deviceorientation.html

@@ -49,7 +49,6 @@
 				camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 1000 );
 				camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 1000 );
 
 
 				controls = new THREE.DeviceOrientationControls( camera );
 				controls = new THREE.DeviceOrientationControls( camera );
-				controls.connect();
 
 
 				scene = new THREE.Scene();
 				scene = new THREE.Scene();
 
 

+ 2 - 0
examples/js/controls/DeviceOrientationControls.js

@@ -90,4 +90,6 @@ THREE.DeviceOrientationControls = function ( object ) {
 
 
 	};
 	};
 
 
+	this.connect();
+
 };
 };

+ 1 - 3
examples/misc_controls_deviceorientation.html

@@ -93,8 +93,6 @@
 
 
 						}, false);
 						}, false);
 
 
-						controls.connect();
-
 						animate();
 						animate();
 
 
 				  }, false);
 				  }, false);
@@ -103,4 +101,4 @@
 		</script>
 		</script>
 
 
 	</body>
 	</body>
-</html>
+</html>