Browse Source

Fixed ortho interactive example window resize.

Mr.doob 10 years ago
parent
commit
1f8b7176e1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      examples/webgl_interactive_cubes_ortho.html

+ 5 - 1
examples/webgl_interactive_cubes_ortho.html

@@ -96,7 +96,11 @@
 
 			function onWindowResize() {
 
-				camera.aspect = window.innerWidth / window.innerHeight;
+				camera.left = window.innerWidth / - 2;
+				camera.right = window.innerWidth / 2;
+				camera.top = window.innerHeight / 2;
+				camera.bottom = window.innerHeight / - 2;
+
 				camera.updateProjectionMatrix();
 
 				renderer.setSize( window.innerWidth, window.innerHeight );