xr-frame / Exports / ICameraData

# Interface: ICameraData

Camera组件数据接口。

# Table of contents

# Properties

# Properties

# allowFeatures

• allowFeatures: string[]

允许的渲染标记,配合RenderSystem的changeFeatures一起使用。 xml中的数据类型为array,默认为空。


# background

• background: 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一起使用,决定那些节点要被渲染。 xml中的数据类型为number。


# depth

• depth: number

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


# far

• far: number

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


# fov

• fov: number

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


# isARCamera

• isARCamera: boolean

是否为AR相机,配合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

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


# target

• Optional target: Transform

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