# Interface: ICameraData

[Camera](/miniprogram/dev/reference/xr-frame/api/classes/Camera)组件数据接口。

## Table of contents

### Properties

- allowFeatures
- background
- clearColor
- clearDepth
- clearStencil
- cullMask
- depth
- far
- fov
- isARCamera
- isClearColor
- isClearDepth
- isClearStencil
- isPerspective
- near
- orthSize
- postProcess
- renderTarget
- target

## Properties

### allowFeatures

• **allowFeatures**: `string`[]

允许的渲染标记，配合[RenderSystem](/miniprogram/dev/reference/xr-frame/api/classes/RenderSystem)的`changeFeatures`一起使用。
`xml`中的数据类型为`array`，默认为空。

___

### background

• **background**: [`TCameraBackground`](../modules#TCameraBackground)

背景清屏模式。
`xml`中的数据类型为`string`，默认为`default`。

___

### clearColor

• **clearColor**: `number`[]

清屏颜色。
`xml`中的数据类型为`color`，默认为`0 0 0 1`。

___

### clearDepth

• **clearDepth**: `number`

清屏深度。
`xml`中的数据类型为`number`，默认为`1`。

___

### clearStencil

• **clearStencil**: `number`

清屏模板值。
`xml`中的数据类型为`number`，默认为`0`。

___

### cullMask

• **cullMask**: `number`

掩码，一般和[Transform.layer](../classes/Transform#layer)一起使用，决定那些节点要被渲染。
`xml`中的数据类型为`number`。

___

### depth

• **depth**: `number`

深度，决定在多相机时的渲染顺序。
`xml`中的数据类型为`number`。

___

### far

• **far**: `number`

远平面。
`xml`中的数据类型为`number`，默认为`100`。

___

### fov

• **fov**: `number`

视场角。
`xml`中的数据类型为`number`，默认为`60`。

___

### isARCamera

• **isARCamera**: `boolean`

是否为AR相机，配合[ARSystem](/miniprogram/dev/reference/xr-frame/api/classes/ARSystem)使用。
`xml`中的数据类型为`boolean`，默认为`false`。
**非常需要注意当设置为`true`时不能同时设置`target`数据！**

___

### isClearColor

• **isClearColor**: `boolean`

清屏是否要清颜色。
`xml`中的数据类型为`boolean`，默认为`true`。

___

### isClearDepth

• **isClearDepth**: `boolean`

清屏是否要清深度。
`xml`中的数据类型为`boolean`，默认为`true`。

___

### isClearStencil

• **isClearStencil**: `boolean`

清屏是否要清模板值。
`xml`中的数据类型为`boolean`，默认为`true`。

___

### isPerspective

• **isPerspective**: `boolean`

是否为透视相机。
`xml`中的数据类型为`boolean`，默认为`true`。

___

### near

• **near**: `number`

近平面。
`xml`中的数据类型为`number`，默认为`0.1`。

___

### orthSize

• **orthSize**: `number`

非透视模式，即正交模式时，可视范围大小。
`xml`中的数据类型为`number`，默认为`4`。

___

### postProcess

• **postProcess**: `string`[]

后处理，一个后处理资源id的数组。
`xml`中的数据类型为`array`，默认为空。

___

### renderTarget

• `Optional` **renderTarget**: [`RenderTexture`](/miniprogram/dev/reference/xr-frame/api/classes/RenderTexture)

相机的渲染目标，如果不设置则渲染到屏幕。
`xml`中的数据类型为`render-texture`资源。

___

### target

• `Optional` **target**: [`Transform`](/miniprogram/dev/reference/xr-frame/api/classes/Transform)

相机对准的目标节点，如果不设置则为自由模式。
`xml`中的数据类型为节点对应的`nodeId`。
