I have added a dropdown list on the page for selecting between two cameras - Perspective and Orthographic. Currently, my Three Scene is using a perspective Camera. I would like to dynamically change the camera to "Orthographic" when selected in the dropdown list, and switch back to Perspective if that option is chosen. Can anyone please assist me with achieving this functionality?
For those interested in the detailed code, here is the link to the Jsfiddle: http://jsfiddle.net/sagh0900/7Anag/9/
camera = new THREE.PerspectiveCamera( 45, width / height, 0.1, 1000 );
camera.position.y = 0;
camera.position.z = 40;
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene = new THREE.Scene();
scene.add(camera);
mesh = new THREE.Mesh(new THREE.Geometry());
scene.add(mesh);
Thank you in advance for your help.