Three.V8

3D rendering engine using JavaScript as user script.

View on GitHub

<–Home

class PerspectiveCamera

class PerspectiveCamera extends Camera

Inheritance Object3D –> Camera –> PerspectiveCamera

Name Description
Constructors  
PerspectiveCamera() Creates a perspective Camera.
Properties  
isPerspectiveCamera Checks if the object is PerspectiveCamera
fov Camera frustum vertical field of view
aspect Camera frustum aspect ratio
near Camera frustum near plane
far Camera frustum far plane
Methods  
updateProjectionMatrix Updates the camera projection matrix.

Constructors

PerspectiveCamera()

PerspectiveCamera(fov: Number, aspect: Number, near: Number, far: Number)

Creates a perspective camera.

Parameters

fov: Camera frustum vertical field of view.

aspect: Camera frustum aspect ratio.

near: Camera frustum near plane.

far: Camera frustum far plane.

Together these define the camera’s viewing frustum.

Properties

See the base Camera class for common properties. Note that after making changes to most of these properties you will have to call .updateProjectionMatrix for the changes to take effect.

isPerspectiveCamera

.isPerspectiveCamera: Boolean

Read-only flag to check if a given object is of type PerspectiveCamera.

fov

.fov: Number

Camera frustum vertical field of view, from bottom to top of view, in degrees. Default is 50.

Readable and writable.

aspect

.aspect: Number

Camera frustum aspect ratio, usually the canvas width / canvas height. Default is 1 (square canvas).

Readable and writable.

near

.near: Number

Camera frustum near plane. Default is 0.1.

The valid range is greater than 0 and less than the current value of the far plane.

Readable and writable.

far

.far: Numbers

Camera frustum far plane. Default is 200.

Must be greater than the current value of near plane.

Readable and writable.

Methods

See the base Camera class for common methods.

updateProjectionMatrix()

.updateProjectionMatrix(): undefined

Updates the camera projection matrix. Must be called after any change of parameters.