CameraComponent: {
    clearColor: number[];
    clearColorBuffer: boolean;
    clearDepthBuffer: boolean;
    enabled: boolean;
    farClip: number;
    fov: number;
    frustumCulling: boolean;
    layers: number[];
    nearClip: number;
    orthoHeight: number;
    priority: number;
    projection: number;
    rect: number[];
}

Camera Component Properties.

Type declaration

  • clearColor: number[]

    The color used to clear the camera's render target.

    [0.118,0.118,0.118,1]
    
  • clearColorBuffer: boolean

    If true, the camera will explicitly clear its render target to the chosen clear color before rendering the scene.

    true
    
  • clearDepthBuffer: boolean

    If true, the camera will explicitly clear the depth buffer of its render target before rendering the scene.

    true
    
  • enabled: boolean

    Whether the component is enabled.

    true
    
  • farClip: number

    The distance in camera space from the camera's eye point to the far plane.

    1000
    
  • fov: number

    The angle (in degrees) between top and bottom clip planes of a perspective camera.

    45
    
  • frustumCulling: boolean

    Controls the culling of mesh instances against the camera frustum. If true, culling is enabled. If false, all mesh instances are rendered.

    true
    
  • layers: number[]

    An array of layer id's that this camera will render.

    [0,1,2,3,4]
    
  • nearClip: number

    The distance in camera space from the camera's eye point to the near plane.

    0.1
    
  • orthoHeight: number

    The distance in world units between the top and bottom clip planes of an orthographic camera.

    4
    
  • priority: number

    A number that defines the order in which camera views are rendered by the engine. Smaller numbers are rendered first.

    0
    
  • projection: number

    The projection type of the camera. Can be pc.PROJECTION_PERSPECTIVE or pc.PROJECTION_ORTHOGRAPHIC.

    0
    
  • rect: number[]

    An array that represents the viewport onto the camera's attached render target defined by normalized coordinates.

    [0,0,1,1]