• Converts the given object to a Vector3 instance.

    Parameters

    • obj: any

      The object to convert.

    • Optional y: number

      The y component of the vector. Default is 0.

    • Optional z: number

      The z component of the vector. Default is 0.

    Returns Vector3 | undefined

    A new Vector3 instance representing the given object.