Constructor
new PerspectiveProjection(fovopt, aspectopt, nearopt, faropt)
Creates a PerspectiveProjection instance.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
fov | number | <optional> | 50 | Vertical field of view in degrees. |
aspect | number | <optional> | 1 | Aspect ratio (width / height). |
near | number | <optional> | 0.1 | Near clipping plane. |
far | number | <optional> | 2000 | Far clipping plane. |
Members
aspect :number
The aspect ratio (width / height).
Type:
- number
- Default Value
- 1
far :number
The far clipping plane.
Type:
- number
- Default Value
- 2000
fov :number
The vertical field of view in degrees.
Type:
- number
- Default Value
- 50
near :number
The near clipping plane.
Type:
- number
- Default Value
- 0.1
Methods
(protected) _updateMatrix()
Updates the perspective projection matrix.
copy(source) → {PerspectiveProjection}
Copies the parameters from another PerspectiveProjection.
Parameters:
| Name | Type | Description |
|---|---|---|
source | PerspectiveProjection |
Returns:
this
- Type:
- PerspectiveProjection
set(fov, aspect, near, far) → {PerspectiveProjection}
Sets all perspective parameters at once.
Parameters:
| Name | Type | Description |
|---|---|---|
fov | number | Vertical field of view in degrees. |
aspect | number | Aspect ratio (width / height). |
near | number | Near clipping plane. |
far | number | Far clipping plane. |
Returns:
this
- Type:
- PerspectiveProjection