Function lookAt

  • Computes a 4-by-4 view transformation.

    This is a view matrix which transforms all other objects to be in the space of the view defined by the parameters.

    Parameters

    • eye: Vec3

      The position of the object.

    • target: Vec3

      The position meant to be aimed at.

    • up: Vec3

      A vector pointing up.

    • Optional dst: Mat4

      matrix to hold result. If not passed a new one is created.

    Returns Mat4

    The look-at matrix.