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

PropertyModifiersTypeDescription
controlsFirstPersonCameraControlsWrapper | FlyCameraControlsWrapper | ThirdPersonCameraControlsWrapper

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

- if mode is firstperson the controls will be an instance of FirstPersonCameraControlsWrapper - if mode is thirdperson the controls will be an instance of ThirdPersonCameraControlsWrapper - if mode is fly the controls will be an instance of FlyCameraControlsWrapper

heightOffsetnumberReturns vertical offset from the target object, this is used in combination with the mode property.
maxZoomOutnumberRepresents the maximum distance from the target object, this is used in combination with the mode property.
mode"firstperson" | "thirdperson"
targetObject3D<import("three").Object3DEventMap>
usePointerLockboolean