Class: OrthographicCamera

OrthographicCamera(leftOrOptions, rightopt, bottomopt, topopt, nearopt, faropt)

Orthographic camera. Supports two configuration modes: 1) Explicit bounds: (left, right, bottom, top, near, far). 2) View-size mode: `viewSize + aspectRatio` => bounds are computed automatically. Notes: - `viewSize` represents the height of the view volume in world units. - In view-size mode `setAspectRatio()` updates bounds automatically.

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

OrthographicCamera

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: