magic-pixels
    Preparing search index...

    Function perspective

    • creates a perspective projection matrix

      Parameters

      • fieldOfView: number

        Specifies the field of view angle, in degrees, in the y direction.

      • aspectRatio: number

        Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).

      • zNear: number

        Specifies the distance from the viewer to the near clipping plane (always positive).

      • zFar: number

        Specifies the distance from the viewer to the far clipping plane (always positive).

      Returns Matrix

      4x4 perspective projection matrix (see Mat4.perspective for the Mat4 variant)