Function setFocalLength

  • Beta

    Sets a camera's focal length.

    Parameters

    • camera: PerspectiveCamera
    • focalLength: number

      Focal length in pixels. It must be larger than 0.

    • viewportHeight: number

      Viewport height in pixels, used to compute vertical fov.

    Returns number

    The new camera's focal length in pixels.

    Remarks

    The camera's vertical fov will be updated to achieve the given viewport height.

Generated using TypeDoc