Constructor
new OrthographicCamera(leftOrOptions, rightopt, bottomopt, topopt, nearopt, faropt)
Creates an orthographic camera.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
leftOrOptions |
number | Object | Either left bound (number) or an options object. | |
right |
number |
<optional> |
Right bound (explicit bounds mode). |
bottom |
number |
<optional> |
Bottom bound (explicit bounds mode). |
top |
number |
<optional> |
Top bound (explicit bounds mode). |
near |
number |
<optional> |
Near clipping plane distance. |
far |
number |
<optional> |
Far clipping plane distance. |
- 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 (width / height). Only affects the camera in view-size mode.
Parameters:
| Name | Type | Description |
|---|---|---|
aspectRatio |
number | New viewport aspect ratio (canvas width divided by canvas height). |
- Source: