Browse Source

Examples: Clean up. (#27961)

Michael Herzog 1 year ago
parent
commit
a49dde2691
1 changed files with 4 additions and 2 deletions
  1. 4 2
      examples/misc_controls_transform.html

+ 4 - 2
examples/misc_controls_transform.html

@@ -47,8 +47,10 @@
 
 
 				const aspect = window.innerWidth / window.innerHeight;
 				const aspect = window.innerWidth / window.innerHeight;
 
 
-				cameraPersp = new THREE.PerspectiveCamera( 50, aspect, 0.01, 30000 );
-				cameraOrtho = new THREE.OrthographicCamera( - 600 * aspect, 600 * aspect, 600, - 600, 0.01, 30000 );
+				const frustumSize = 5;
+
+				cameraPersp = new THREE.PerspectiveCamera( 50, aspect, 0.1, 100 );
+				cameraOrtho = new THREE.OrthographicCamera( - frustumSize * aspect, frustumSize * aspect, frustumSize, - frustumSize, 0.1, 100 );
 				currentCamera = cameraPersp;
 				currentCamera = cameraPersp;
 
 
 				currentCamera.position.set( 5, 2.5, 5 );
 				currentCamera.position.set( 5, 2.5, 5 );