2
0
Эх сурвалжийг харах

Fixed ortho interactive example window resize.

Mr.doob 10 жил өмнө
parent
commit
1f8b7176e1

+ 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 );