Browse Source

Whitespace fixes

Per-Olov Jernberg 12 years ago
parent
commit
d7349bebcf
2 changed files with 20 additions and 20 deletions
  1. 8 8
      examples/js/controls/OculusControls.js
  2. 12 12
      examples/misc_controls_oculusrift.html

+ 8 - 8
examples/js/controls/OculusControls.js

@@ -32,16 +32,16 @@ THREE.OculusControls = function ( object ) {
 		xhr.send( null );
 	};
 
-    this.gotCoordinates = function( r ) {
-        this.headquat.set(r.quat.x, r.quat.y, r.quat.z, r.quat.w);
-        this.queuePoll();
-    }
+	this.gotCoordinates = function( r ) {
+		this.headquat.set(r.quat.x, r.quat.y, r.quat.z, r.quat.w);
+		this.queuePoll();
+	}
 
-    this.pollOnce = function() {
-       	this.loadAjaxJSON('http://localhost:50000', bind(this, this.gotCoordinates));
-    }
+	this.pollOnce = function() {
+		this.loadAjaxJSON('http://localhost:50000', bind(this, this.gotCoordinates));
+	}
 
-    this.queuePoll = function() {
+	this.queuePoll = function() {
 		setTimeout(bind(this, this.pollOnce), 10);
 	}
 

+ 12 - 12
examples/misc_controls_oculusrift.html

@@ -28,10 +28,10 @@
 	</head>
 	<body>
 
-	    <div id="info">
-	        <a href="http://threejs.org" target="_blank">three.js</a> - headtracking demo for oculus rift. requires <a href="https://github.com/possan/oculus-rest/" target="_blank">oculus-rest</a> to get headtracking coordinates working.<br />
-	        (left click: forward, a/s/w/d/r/f: move, h: hide text)
-	    </div>
+		<div id="info">
+			<a href="http://threejs.org" target="_blank">three.js</a> - headtracking demo for oculus rift. requires <a href="https://github.com/possan/oculus-rest/" target="_blank">oculus-rest</a> to get headtracking coordinates working.<br />
+			(left click: forward, a/s/w/d/r/f: move, h: hide text)
+		</div>
 
 		<script src="../build/three.min.js"></script>
 		<script src="js/ImprovedNoise.js"></script>
@@ -116,9 +116,9 @@
 
 				}
 				window.addEventListener( 'resize', onWindowResize, false );
-	            document.addEventListener('keydown', keyPressed, false);
+				document.addEventListener('keydown', keyPressed, false);
 
-	            oculuscontrol.connect();
+				oculuscontrol.connect();
 			}
 
 			function onWindowResize() {
@@ -130,12 +130,12 @@
 				controls.handleResize();
 			}
 
-	        function keyPressed(event) {
-	            if (event.keyCode === 72) { // H
-	                guiVisible = !guiVisible;
-	                document.getElementById('info').style.display = guiVisible ? "block" : "none";
-	            }
-	        }
+			function keyPressed(event) {
+				if (event.keyCode === 72) { // H
+					guiVisible = !guiVisible;
+					document.getElementById('info').style.display = guiVisible ? "block" : "none";
+				}
+			}
 
 			function animate() {
 				requestAnimationFrame( animate );