Browse Source

fix volume render example aspect

Almar Klein 7 years ago
parent
commit
aea5f5ae38
1 changed files with 4 additions and 1 deletions
  1. 4 1
      examples/webgl_materials_texture3d_volume1.html

+ 4 - 1
examples/webgl_materials_texture3d_volume1.html

@@ -213,7 +213,10 @@
 
 		function onWindowResize() {
 
-			camera.aspect = window.innerWidth / window.innerHeight;
+			this.camera.right = window.innerWidth / 5.0;
+			this.camera.left = -this.camera.right;
+			this.camera.top = window.innerHeight / 5.0;
+			this.camera.bottom = -this.camera.top;
 			camera.updateProjectionMatrix();
 
 			renderer.setSize( window.innerWidth, window.innerHeight );