μMath
    Preparing search index...

    Function perspectiveFromFieldOfView

    • Create a perspective projection matrix from a field of view. Useful for generating projection matrices to be used with the WebXR API.

      Type Parameters

      Parameters

      • left: number

        The angle to the left of the field of view in degrees.

      • right: number

        The angle to the right of the field of view in degrees.

      • bottom: number

        The angle to the bottom of the field of view in degrees.

      • top: number

        The angle to the top of the field of view in degrees.

      • near: number

        The near bound of the frustum.

      • far: number

        The far bound of the frustum.

      • out: T

        The matrix to store the result in.

      Returns T

      The perspective projection matrix.