I was looking online, but I didn’t found much. I’m basically looking for the camera function that renders an image when a button is pressed.
Notice that I have 2 THREE.PerspectiveCamera (main and 2nd). The main camera is the one I use for the OrbitControls. and the 2nd is for capturing the image.
This is how I declare the Three.PerspectiveCamera:
camera_RT = new THREE.PerspectiveCamera(20, window.innerWidth / window.innerHeight, -100, -1000); camera_RT.position.set( //Set 2nd camera's position according to its parent camera_RT.position.x, camera_RT.position.y, camera_RT_Holder.position.z ); camera_RT.updateMatrixWorld(); //Update camera's Matrix Wolrd (location in the scene) //Add the Camera to the camera Holder (parent objects) camera_RT_Holder.add(camera_RT); //Create 2nd Camera Helper (View volume) camera_RT_Helper = new THREE.CameraHelper( camera_RT ); //Create camera helper scene_Main.add( camera_RT_Helper );//Add the camera helper to the scene