Maincamera

MainCamera class

Main camera used to render the scene, this is actually an instance of three.js PerspectiveCamera (opens in a new tab)

Signature:

export class MainCamera extends AbstractCamera 

Extends: AbstractCamera

Properties

Property

Modifiers

Type

Description

controls

FirstPersonCameraControlsWrapper | ThirdPersonCameraControlsWrapper | FlyCameraControlsWrapper

Returns the current camera controls, the type of the controls depends on the mode property:

disableCollision

boolean

disableWheelZoom

boolean

heightOffset

number

Returns vertical offset from the target object, this is used in combination with the useControls method.

maxZoomOut

number

Represents the maximum distance from the target object, this is used in combination with the useControls method.

mode

"thirdperson" | "firstperson"

target

Object3D<import("three").Object3DEventMap>

usePointerLock

boolean

Methods

Method

Modifiers

Description

useControls(controls)