Browse Source

Clean up.

Mr.doob 8 years ago
parent
commit
40fa941456
1 changed files with 4 additions and 2 deletions
  1. 4 2
      examples/webvr_rollercoaster.html

+ 4 - 2
examples/webvr_rollercoaster.html

@@ -196,14 +196,16 @@
 
 
 			//
 			//
 
 
-			window.addEventListener( 'resize', function () {
+			window.addEventListener( 'resize', onWindowResize, false );
+
+			function onWindowResize() {
 
 
 				camera.aspect = window.innerWidth / window.innerHeight;
 				camera.aspect = window.innerWidth / window.innerHeight;
 				camera.updateProjectionMatrix();
 				camera.updateProjectionMatrix();
 
 
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 
-			}, false );
+			}
 
 
 			//
 			//