立体相机([name])

双透视摄像机(立体相机)常被用于创建[link:https://en.wikipedia.org/wiki/Anaglyph_3D 3D Anaglyph](3D立体影像)或者[link:https://en.wikipedia.org/wiki/parallax_barrier Parallax Barrier](视差效果)。

示例

[example:webgl_effects_anaglyph effects / anaglyph]

[example:webgl_effects_parallaxbarrier effects / parallaxbarrier]

[example:webgl_effects_stereo effects / stereo]

这些类在以上示例中的文件内部使用:

[link:https://github.com/Soft8Soft/verge3d-code-examples/blob/master/js/effects/AnaglyphEffect.js examples/js/effects/AnaglyphEffect.js]

[link:https://github.com/Soft8Soft/verge3d-code-examples/blob/master/js/effects/ParallaxBarrierEffect.js examples/js/effects/ParallaxBarrierEffect.js]

[link:https://github.com/Soft8Soft/verge3d-code-examples/blob/master/js/effects/StereoEffect.js examples/js/effects/StereoEffect.js]

构造器

[name]()

属性

[property:Float aspect]

默认值是*1*.

[property:Float eyeSep]

默认值是*0.064*.

[property:PerspectiveCamera cameraL]

左摄像机,它被加入到了[page:Layers layer 1]中 —— 需要被左摄像机渲染的物体也应当要加入到这一层中。

[property:PerspectiveCamera cameraR]

右摄像机,它被加入到了[page:Layers layer 2]中 —— 需要被右摄像机渲染的物体也应当要加入到这一层中。

方法

[method:null update]([param:PerspectiveCamera camera])

基于摄像机通过场景,更新立体摄像机。

源代码

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]