linearly v0.32.0Docs


linearly v0.32.0 / mat4 / perspectiveFromFieldOfView

Function: perspectiveFromFieldOfView()

perspectiveFromFieldOfView(fov, near, far): mat4

Generates a perspective projection matrix with the given field of view. This is primarily useful for generating projection matrices to be used with the still experiemental WebVR API.

Parameters

fov: FovDegrees

Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees

near: number

Near bound of the frustum

far: number

Far bound of the frustum

Returns

mat4

Defined in

src/mat4.ts:1179open in new window