Cameras - thothbot/parallax GitHub Wiki
Class diagram for cameras
Description
Perspective Camera
A camera of class PerspectiveCamera
emulates the human eye: objects farther away appear smaller in size. Perspective camera projections are natural in situations where you want to imitate how objects appear to a human observer.
PerspectiveCamera camera = new PerspectiveCamera(
45, // vertical field of view
width / height, // aspect ratio
1, // near plane
1000 ); // far plane
Orthographic Camera
In contrast to perspective cameras, cameras of class OrthographicCamera
produce parallel projections, with no distortions for distance. Orthographic cameras are useful for precise design work, where visual distortions would interfere with exact measurement.
images/orthographic_camera.jpg
// Simple creation in Parallax 1.3
OrthographicCamera camera = new OrthographicCamera(
width, // width plane
height, // height plane
1, // near plane
1000 ); // far plane
// Complex creation
OrthographicCamera camera = new OrthographicCamera(
width / - 2, // left
width / 2, // right
height / 2, // top
height / - 2, // bottom
1, // near
1000 ); // far
Cube Camera
Cube camera used for rendering cube maps.
// Simple example how to use the camera
CubeCamera cubeCamera = new CubeCamera(
1, // near
1000, // far
256 ); // cube resolution
cubeCamera.getRenderTarget().setMinFilter( TextureMinFilter.LINEAR_MIPMAP_LINEAR );
getScene().add( cubeCamera );
MeshBasicMaterial material = new MeshBasicMaterial();
material.setEnvMap( cubeCamera.getRenderTarget() );