codecamp

three.js StereoCamera

双透视摄像机(立体相机)常被用于创建3D Anaglyph(3D立体影像) 或者Parallax Barrier(视差屏障)。

例子

effects / anaglyph

effects / parallaxbarrier

effects / stereo

构造器

StereoCamera( )

属性

.aspect : Float

默认值是1.

.eyeSep : Float

默认值是0.064.

.cameraL : PerspectiveCamera

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

.cameraR : PerspectiveCamera

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

方法

.update ( camera : PerspectiveCamera ) : undefined

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

源代码

src/cameras/StereoCamera.js


three.js PerspectiveCamera
three.js Animation
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定