Base class that provides camera related apis

Hierarchy (view full)

Implements

Constructors

Properties

cameraComponent: Camera
cameraTransform: Transform

Methods

  • Add SceneObject as a child of the camera's SceneObject

    Parameters

    Returns void

  • Returns the back vector of the camera. This is actually the front vector because the camera is reversed in Lens Studio.

    Returns vec3

  • Clears the renderTarget with the provided color before drawing to it

    Parameters

    • color: vec4

      the color to clear the renderTarget with

    Returns void

  • Returns the forward vector of the camera. This is actually the back vector because the camera is reversed in Lens Studio.

    Returns vec3

  • Returns mat4

  • Parameters

    • worldPosition: vec3

      vec3 representing the position in world space

    Returns boolean

    whether a position is in camera FoV or not

  • Returns the camera's world position projected from screen space coordinates at a given z depth

    Parameters

    • x: number
    • y: number
    • absoluteDepth: number

    Returns vec3

  • Returns the up vector of the camera.

    Returns vec3