Camera - Verge3D User Manual - Soft8Soft
Description: Learn how to use Camera in your interactive 3D apps made with Verge3D

Object3D →

# Camera

Abstract base class for cameras. This class should always be inherited when you build a new camera.

## Constructor

### Camera()

Creates a new Camera. Note that this class is not intended to be called directly; you probably want a PerspectiveCamera or OrthographicCamera instead.

## Properties

See the base Object3D class for inherited properties.

### # .controlSettings : ControlSettings

Camera control settings used to assign application controls.

### # .ignoreShadowLayers : Boolean

Ignore camera layers when rendering objects into the shadow map. Used internally by SSR pass. Default is `false`.

### # .isCamera : Boolean

Read-only flag to check if a given object is of type Camera.

### # .layers : Layers

The layers that the camera is a member of. This is an inherited property from Object3D.

Objects must share at least one layer with the camera to be seen by the camera.

### # .matrixWorldInverse : Matrix4

This is the inverse of `matrixWorld`. `matrixWorld` contains the matrix which has the world transform of the camera.

### # .projectionMatrix : Matrix4

This is the matrix which contains the projection.

### # .projectionMatrixInverse : Matrix4

The inverse of `projectionMatrix`.

### # .viewportFit : Object

An object with viewport fit settings:

type
  Viewport fit type, see here for more info.
initialAspect
  Initial viewport aspect ratio.

## Methods

See the base Object3D class for inherited methods.

### # .clone(recursive : Boolean) → Camera

Return a new camera with the same properties as this one.

### # .copy(source : Camera, recursive : Boolean) → this

Copy the properties from the source camera into this one.

### # .getWorldDirection(target : Vector3) → Vector3

target — the result will be copied into this vector.

Returns a Vector3 representing the world space direction in which the camera is looking. Note: A camera looks down its local, negative Z-axis.

## Puzzles

There are numerous camera puzzles to manage your camera with no coding.

## Source

For more info on how to obtain the source code of this module see this page.