• Parameters

    • size: [number, number]

      the size of the HTML canvas

    • perspective: string = "perspective"

      "orthographic" or "perspective"

    • fov: number = 45

      the field of view (perspective only)

    Returns number[]

    a 4x4 projection matrix

    Description

    Create a 4x4 projection matrix for either a perspective or orthographic view.