Constructor
new PerspectiveCamera(fieldOfViewRadians, aspectRatio, near, far)
Parameters:
| Name | Type | Description |
|---|---|---|
fieldOfViewRadians |
number | Vertical field of view in radians. |
aspectRatio |
number | Viewport aspect ratio (width / height). |
near |
number | Distance to the near clipping plane (must be greater, than 0). |
far |
number | Distance to the far clipping plane (must be greater, than near). |
- Source:
Classes
Methods
getProjectionMatrix() → {Float32Array}
Returns the projection matrix for this camera. The returned matrix is cached and reused between calls.
- Source:
Returns:
- Cached projection matrix.
- Type
- Float32Array
setAspectRatio(aspectRatio)
Updates the aspect ratio and marks projection cache as dirty.
Parameters:
| Name | Type | Description |
|---|---|---|
aspectRatio |
number | New viewport aspect ratio (canvas width divided by canvas height). |
- Source: