Capítulo 18 de 859
Camera that uses orthographic projection.
In this projection mode, an object's size in the rendered image stays constant regardless of its distance from the camera. This can be useful for rendering 2D scenes and UI elements, amongst other things.
0 and less than the current value of [OrthographicCamera#far](OrthographicCamera…const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
scene.add( camera );
Constructor
| Signature |
|---|
new OrthographicCamera( left : number, right : number, top : number, bottom : number, near : number, far : number ) |
Properties
| Property | Description |
|---|---|
.bottom : number | The bottom plane of the camera's frustum. |
.far : number | The camera's far plane. Must be greater than the current value of OrthographicCamera#near. |
.isOrthographicCamera : boolean (readonly) | This flag can be used for type testing. |
.left : number | The left plane of the camera's frustum. |
.near : number | The camera's near plane. The valid range is greater than 0 and less than the current value of OrthographicCamera#far. |
.right : number | The right plane of the camera's frustum. |
.top : number | The top plane of the camera's frustum. |
.view : Object | Represents the frustum window specification. This property should not be edited directly but via PerspectiveCamera#setViewOffset and [PerspectiveCamera#clearVi… |
.zoom : number | The zoom factor of the camera. |
Methods
| Method | Description |
|---|---|
.clearViewOffset() | Removes the view offset from the projection matrix. |
.setViewOffset( fullWidth : number, fullHeight : number, x : number, y : number, width : number, height : number ) | Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups. |
.updateProjectionMatrix() | Updates the camera's projection matrix. Must be called after any change of camera properties. |