var CinematicCamera = function ( fov, aspect, near, far ) {
PerspectiveCamera.call( this, fov, aspect, near, far );
...
}
CinematicCamera是在透视摄影PerspectiveCamera封装而来,它称为第二人称视角游戏相机;即会在主人物视角的后方,可以看到人物动作的这个一个距离。
这种相机可以设置焦点哦, 突出想要关注的地方, 其他地方比较模糊
1. 属性介绍
属性名: 类型 | 功能 | 默认值 |
---|---|---|
type : 字符串 | 描述信息 | 'CinematicCamera' |
postprocessing : 对象 | 对相机的全部设置 | |
shaderSettings : 对象 | 渲染设置, 最后应用在postprocessing | |
depthShader : 未知 | 组成ShaderMaterial给materialDepth | BokehDepthShader |
materialDepth : ShaderMaterial | 赋予了scene.overrideMaterial | materialDepth |
2. 方法介绍
方法名: 返回类型 | 功能 | 具体内容 |
---|---|---|
类方法 : setLens( focalLength, filmGauge, fNumber, coc ) | setLens | |
类方法 : linearize( depth ) | linearize | |
类方法 : smoothstep( near, far, depth ) | smoothstep | |
类方法 : saturate( x ) | saturate | |
类方法 : focusAt( focusDistance ) | focusAt | |
类方法 : initPostProcessing() | initPostProcessing | |
类方法 : renderCinematic( scene, renderer ) | renderCinematic |