# Class Camera

Five 相机

#### Hierarchy

- Camera
  - Camera

- Defined in lib/five/core/camera.ts:40

##### Index

### Constructors

constructor

### Properties

aspect
autoNearFar
controllerMode
far
fov
near
needsRender
perspToOrtho
pixelRatio
pose
refineModel
resolution
time

### Accessors

bottom
isOrthographicCamera
isPerspectiveCamera
left
orthoDistance
orthographicProjectionMatrix
orthographicProjectionMatrixInverse
perspectiveProjectionMatrix
perspectiveProjectionMatrixInverse
right
top
view
zoom

### Methods

clearViewOffset
computePose
copy
copyPose
getDirection
setFromPose
setViewOffset
updateProjectionMatrix
updateTime

## Constructors

### constructor

- new Camera(
  fov: number,
  aspect?: number,
  near?: number,
  far?: number,
  perspToOrtho?: Vector2,
  resolution?: Vector2,
  pixelRatio?: number,
  ): Camera

  #### Parameters

  - fov: number
  - aspect: number = DEFAULT_ASPECT
  - near: number = DEFAULT_NEAR
  - far: number = DEFAULT_FAR
  - perspToOrtho: Vector2 = ...
  - resolution: Vector2 = ...
  - pixelRatio: number = 1

  #### Returns Camera

  Overrides THREE.Camera.constructor

  - Defined in lib/five/core/camera.ts:66

## Properties

### aspect

aspect: number = DEFAULT_ASPECT

- Defined in lib/five/core/camera.ts:68

### autoNearFar

autoNearFar: boolean

- Defined in lib/five/core/camera.ts:47

### controllerMode

controllerMode: Mode | null

- Defined in lib/five/core/camera.ts:52

### far

far: number = DEFAULT_FAR

- Defined in lib/five/core/camera.ts:70

### fov

fov: number

- Defined in lib/five/core/camera.ts:67

### near

near: number = DEFAULT_NEAR

- Defined in lib/five/core/camera.ts:69

### needsRender

needsRender: boolean

- Defined in lib/five/core/camera.ts:48

### perspToOrtho

perspToOrtho: Vector2 = ...

- Defined in lib/five/core/camera.ts:71

### pixelRatio

pixelRatio: number = 1

- Defined in lib/five/core/camera.ts:73

### pose

pose: CameraPose

相机姿态

- Defined in lib/five/core/camera.ts:43

### refineModel

refineModel: boolean

- Defined in lib/five/core/camera.ts:49

### resolution

resolution: Vector2 = ...

- Defined in lib/five/core/camera.ts:72

### time

time: number

- Defined in lib/five/core/camera.ts:51

## Accessors

### bottom

- get bottom(): number

  #### Returns number

  - Defined in lib/five/core/camera.ts:123

### isOrthographicCamera

- get isOrthographicCamera(): boolean

  #### Returns boolean

  - Defined in lib/five/core/camera.ts:298

### isPerspectiveCamera

- get isPerspectiveCamera(): boolean

  #### Returns boolean

  - Defined in lib/five/core/camera.ts:294

### left

- get left(): number

  #### Returns number

  - Defined in lib/five/core/camera.ts:127

### orthoDistance

- get orthoDistance(): number

  #### Returns number

  - Defined in lib/five/core/camera.ts:108

### orthographicProjectionMatrix

- get orthographicProjectionMatrix(): Matrix4

  #### Returns Matrix4

  - Defined in lib/five/core/camera.ts:230

### orthographicProjectionMatrixInverse

- get orthographicProjectionMatrixInverse(): Matrix4

  #### Returns Matrix4

  - Defined in lib/five/core/camera.ts:233

### perspectiveProjectionMatrix

- get perspectiveProjectionMatrix(): Matrix4

  #### Returns Matrix4

  - Defined in lib/five/core/camera.ts:223

### perspectiveProjectionMatrixInverse

- get perspectiveProjectionMatrixInverse(): Matrix4

  #### Returns Matrix4

  - Defined in lib/five/core/camera.ts:226

### right

- get right(): number

  #### Returns number

  - Defined in lib/five/core/camera.ts:131

### top

- get top(): number

  #### Returns number

  - Defined in lib/five/core/camera.ts:119

### view

- get view(): {} | null

  #### Returns {} | null

  - Defined in lib/five/core/camera.ts:204

### zoom

- get zoom(): number

  #### Returns number

  - Defined in lib/five/core/camera.ts:115

## Methods

### clearViewOffset

- clearViewOffset(): void

  #### Returns void

  - Defined in lib/five/core/camera.ts:211

### computePose

- computePose(distance?: number): Camera

  通过相机参数反算姿态

  #### Parameters

  - distance: number = 0

  #### Returns Camera

  - Defined in lib/five/core/camera.ts:140

### copy

- copy(source: this, recursive?: boolean): this

  #### Parameters

  - source: this
  - `Optional` recursive: boolean

  #### Returns this

  Overrides THREE.Camera.copy

  - Defined in lib/five/core/camera.ts:302

### copyPose

- copyPose(): CameraPose

  拷贝相机姿态

  #### Returns CameraPose

  - Defined in lib/five/core/camera.ts:182

### getDirection

- getDirection(target: Vector3): Vector3

  #### Parameters

  - target: Vector3

  #### Returns Vector3

  - Defined in lib/five/core/camera.ts:135

### setFromPose

- setFromPose(pose: Partial<CameraPose>): Camera

  设置相机姿态

  #### Parameters

  - pose: Partial<CameraPose>

  #### Returns Camera

  - Defined in lib/five/core/camera.ts:156

### setViewOffset

- setViewOffset(
  fullWidth: number,
  fullHeight: number,
  x: number,
  y: number,
  width: number,
  height: number,
  ): void

  #### Parameters

  - fullWidth: number
  - fullHeight: number
  - x: number
  - y: number
  - width: number
  - height: number

  #### Returns void

  - Defined in lib/five/core/camera.ts:198

### updateProjectionMatrix

- updateProjectionMatrix(): void

  #### Returns void

  - Defined in lib/five/core/camera.ts:217

### updateTime

- updateTime(time: number): void

  #### Parameters

  - time: number

  #### Returns void

  - Defined in lib/five/core/camera.ts:237